Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Theme headers

Started by Muut Archive 11 years ago · 1 replies · 472 views
11 years ago

Hi guys

I have a problem, I try to put in some additional header information and get is shown in my twig file.

.md
title: my title
example: hello world
...

twig file.
{% if page.header.example %}
{{page.header.example}}
{% endif %}

but it does not work, should you specify it for the theme or ? I have another Grav installation where I use a different theme and it works. so ?

11 years ago

Well that should work fine, we do this all the time. See the docs for more examples and details

try dumping the page header in the twig to see what's in there:

TWIG
{{ dump (page.header) }}

Turn on the debugger, and looking in the first "messages" tab.

Suggested topics

Topic Participants Replies Views Activity
Archive · by Muut Archive, 10 years ago
1 673 1 week ago
Archive · by Deleted User, 9 years ago
0 3043 9 years ago
Archive · by Muut Archive, 9 years ago
2 1983 9 years ago
Archive · by Muut Archive, 9 years ago
2 5337 9 years ago
Archive · by Muut Archive, 9 years ago
1 4134 9 years ago