entity-page-title.html.twig

Same filename in this branch
  1. 11.x core/themes/stable9/templates/field/entity-page-title.html.twig
Same filename in other branches
  1. 9 core/themes/stable9/templates/field/entity-page-title.html.twig
  2. 9 core/themes/stable/templates/field/entity-page-title.html.twig
  3. 9 core/modules/system/templates/entity-page-title.html.twig
  4. 10 core/themes/stable9/templates/field/entity-page-title.html.twig
  5. 10 core/modules/system/templates/entity-page-title.html.twig

Default theme implementation for entity page title.

This output from this template is nested within the page-title template as the title variable. This allows a further refinement of the page title specific to an entity.

This template is only used if the additional entity type property 'enable_page_title_template' is set to TRUE.

Available variables:

  • attributes: HTML attributes for the containing span element.
  • title: Entity label.
  • entity: Entity having a label field.
  • view_mode: View mode; for example, "teaser" or "full".

See also

\Drupal\Core\Entity\Controller\EntityViewController::buildTitle()

1 theme call to entity-page-title.html.twig
EntityViewController::buildTitle in core/lib/Drupal/Core/Entity/Controller/EntityViewController.php
Pre-render callback to build the page title.

File

core/modules/system/templates/entity-page-title.html.twig

View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation for entity page title.
  5. *
  6. * This output from this template is nested within the page-title template as
  7. * the title variable. This allows a further refinement of the page title
  8. * specific to an entity.
  9. *
  10. * This template is only used if the additional entity type property
  11. * 'enable_page_title_template' is set to TRUE.
  12. *
  13. * Available variables:
  14. * - attributes: HTML attributes for the containing span element.
  15. * - title: Entity label.
  16. * - entity: Entity having a label field.
  17. * - view_mode: View mode; for example, "teaser" or "full".
  18. *
  19. * @see \Drupal\Core\Entity\Controller\EntityViewController::buildTitle()
  20. *
  21. * @ingroup themeable
  22. */
  23. #}
  24. <span{{ attributes }}>
  25. {{ title }}
  26. </span>

Related topics


Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.