Important

You are browsing the documentation for version 4.1 of OroCommerce, OroCRM and OroPlatform, which is no longer maintained. Read version 5.1 (the latest LTS version) of the Oro documentation to get up-to-date information.

See our Release Process documentation for more information on the currently supported and upcoming releases.

@TitleTemplate

This annotation is used to configure the template that is used to render the page title when the controller tagged with this annotation is accessed:

 1// ...
 2use Oro\Bundle\NavigationBundle\Annotation\TitleTemplate;
 3
 4/**
 5 * @TitleTemplate("The page title")
 6 */
 7public function demoAction()
 8{
 9    // ...
10}

You can use arbitrary placeholders here which you then have to replace later on in your template using the oro_title_set() Twig function:

1{% oro_title_set({params : {"%username%": fullname }}) %}