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

Added "dynamic" page title right to '|'

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

Grav seems to concatenate title of pages with the main site title of the page.
<PAGE_TITLE> | <SITE_TITLE>
For one particular page, I want to add some text to the right side e.g.:
<PAGE_TITLE> | <SITE_TITLE> Some Text
How can I do this via twig?

11 years ago

Grav doesn't actually impose anything on the site title. This is managed by the theme. For example in Antimatter theme this is accomplished in partials/base.html.twig with:

TWIG
<title>{% if header.title %},{{ header.title|e('html') }} | {% endif %},{{ site.title|e('html') }}</title>

You can change this to display whatever you want

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1350 9 years ago
Archive · by Muut Archive, 9 years ago
2 935 9 years ago
Archive · by Muut Archive, 9 years ago
2 4061 9 years ago
Archive · by Muut Archive, 9 years ago
1 2948 9 years ago
Archive · by Muut Archive, 9 years ago
3 1119 9 years ago