Customizing the page titles
Last updated
Was this helpful?
Last updated
Was this helpful?
By default, each page has a default title based on both page location and resource name. If you're not happy with the preset title for a specific page and would like to customize it, you can easily change it using Twig Hooks.
Search for "title_block" in the call graph of the Symfony debug profiler in the Twig Hooks
section.
We're going to reuse this hook and its template in our config file and add a header
key:
@=_context
contains all the current Twig vars.
To add an icon to the page title, you need to use Twig hooks configuration.
Search for "title_block" in the call graph of the Symfony debug profiler in the Twig Hooks
section. We're going to reuse this hook and its template in our config file.
Here's an example to define a "users" icon on a speaker list.
You can also define a default icon for every "index" pages.
To add a subheader to the page title, you need to use Twig hooks configuration.
Here's an example to define a subheader on a speaker list.
Note that you can also use in the configuration key for dynamic titles:
See the to see how to search for the title block.