Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Theme headers

Started by Muut Archive 10 years ago · 1 replies · 337 views
10 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 ?

10 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 Deleted User, 9 years ago
0 1352 9 years ago
Archive · by Muut Archive, 9 years ago
2 935 9 years ago
Archive · by Muut Archive, 9 years ago
2 4063 9 years ago
Archive · by Muut Archive, 9 years ago
1 2949 9 years ago
Archive · by Muut Archive, 9 years ago
3 1119 9 years ago