menu-region--footer.html.twig
Same filename in other branches
Default theme implementation to display the navigation footer menu.
Available variables:
- menu_name: The machine name of the user menu.
- help: TRUE if "Help" module is enabled.
- title: A name of account.
- items: A nested list of menu items. Each menu item contains:
- attributes: HTML attributes for the menu item.
- below: The menu item child items.
- title: The menu link title.
- url: The menu link URL, instance of \Drupal\Core\Url
- localized_options: Menu link localized options.
- is_expanded: TRUE if the link has visible children within the current menu tree.
- is_collapsed: TRUE if the link has children within the current menu tree that are not currently visible.
- in_active_trail: TRUE if the link is in the active trail.
1 theme call to menu-region--footer.html.twig
- UserLazyBuilder::renderNavigationLinks in core/
modules/ navigation/ src/ UserLazyBuilder.php - Lazy builder callback for rendering navigation links.
File
-
core/
modules/ navigation/ templates/ menu-region--footer.html.twig
View source
- {#
- /**
- * @file
- * Default theme implementation to display the navigation footer menu.
- *
- * Available variables:
- * - menu_name: The machine name of the user menu.
- * - help: TRUE if "Help" module is enabled.
- * - title: A name of account.
- * - items: A nested list of menu items. Each menu item contains:
- * - attributes: HTML attributes for the menu item.
- * - below: The menu item child items.
- * - title: The menu link title.
- * - url: The menu link URL, instance of \Drupal\Core\Url
- * - localized_options: Menu link localized options.
- * - is_expanded: TRUE if the link has visible children within the current
- * menu tree.
- * - is_collapsed: TRUE if the link has children within the current menu tree
- * that are not currently visible.
- * - in_active_trail: TRUE if the link is in the active trail.
- *
- * @ingroup themeable
- */
- #}
- {% set menu_heading_id = 'menu--' ~ menu_name|clean_unique_id %}
- <div class="admin-toolbar__item">
- <h4 id="{{ menu_heading_id }}" class="toolbar-block__title visually-hidden focusable">{{ title }}</h4>
- <ul class="toolbar-block__list">
- {% if help %}
- <li class="toolbar-block__list-item">
- {% include 'navigation:toolbar-button' with {
- attributes: create_attribute({ 'href': path('help.main'), 'data-drupal-tooltip': 'Help'|t, 'data-drupal-tooltip-class': 'admin-toolbar__tooltip' }),
- icon: 'help',
- html_tag: 'a',
- text: 'Help'|t,
- modifiers: ['collapsible'],
- } only %}
- </li>
- {% endif %}
- <li id="admin-toolbar-user-menu" class="toolbar-block__list-item toolbar-block__list-item--user toolbar-popover" data-toolbar-popover>
- {% include 'navigation:toolbar-button' with {
- action: 'Extend'|t,
- attributes: create_attribute({
- 'aria-expanded': 'false',
- 'aria-controls': 'admin-toolbar-user-menu',
- 'data-toolbar-popover-control': true,
- 'data-has-safe-triangle': true,
- }),
- icon: menu_name|clean_class,
- text: title,
- modifiers: [
- 'expand--side',
- 'collapsible',
- ],
- extra_classes: [
- 'toolbar-popover__control',
- ],
- } only %}
- <div class="toolbar-popover__wrapper" data-toolbar-popover-wrapper>
- {% include 'navigation:toolbar-button' with {
- attributes: create_attribute(),
- modifiers: [
- 'large',
- 'dark',
- 'non-interactive',
- ],
- extra_classes: [
- 'toolbar-popover__header',
- ],
- html_tag: 'span',
- text: title,
- } only %}
- <ul class="toolbar-menu toolbar-popover__menu">
- {% for item in items %}
- <li class="toolbar-menu__item toolbar-menu__item--level-1">
- {% include 'navigation:toolbar-button' with {
- attributes: create_attribute({ 'href': item.url|render }),
- html_tag: 'a',
- text: item.title,
- } only %}
- </li>
- {% endfor %}
- </ul>
- </div>
- </li>
- </ul>
- </div>
Related topics
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.