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 →

Added "dynamic" page title right to '|'

Started by Muut Archive 11 years ago · 1 replies · 449 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 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