You are here

menu-link-content.html.twig in Menu item content fields 8

Default theme implementation to present a menu item entity.

Available variables:

  • content: Menu item content.
  • title_prefix: Additional output populated by modules, intended to be displayed in front of the main title tag that appears in the template.
  • title_suffix: Additional output populated by modules, intended to be displayed after the main title tag that appears in the template.
  • view_mode: View mode; for example, "teaser" or "full".
  • attributes: HTML attributes for the containing element.
  • title_attributes: Same as attributes, except applied to the main title tag that appears in the template.

File

templates/menu-link-content.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation to present a menu item entity.
  5. *
  6. * Available variables:
  7. * - content: Menu item content.
  8. * - title_prefix: Additional output populated by modules, intended to be
  9. * displayed in front of the main title tag that appears in the template.
  10. * - title_suffix: Additional output populated by modules, intended to be
  11. * displayed after the main title tag that appears in the template.
  12. * - view_mode: View mode; for example, "teaser" or "full".
  13. * - attributes: HTML attributes for the containing element.
  14. * - title_attributes: Same as attributes, except applied to the main title
  15. * tag that appears in the template.
  16. *
  17. * @ingroup themeable
  18. */
  19. #}
  20. <div{{ attributes }}>
  21. {{ title_suffix.contextual_links }}
  22. {{ content }}
  23. </div>