title.twig
Same filename in this branch
Same filename and directory in other branches
{% set classes = [ 'toolbar-title', ] %} {% if modifiers is iterable %} {% set classes = classes|merge(modifiers|map(modifier => "toolbar-title--#{modifier}")) %} {% endif %} {% if extra_classes is iterable %} {% set classes = classes|merge(extra_classes) %} {% endif %} <{{html_tag|default('h2')}}{{attributes.addClass(classes)}}> {% if icon %} {{ icon('navigation', icon, { class: 'toolbar-title__icon', size: 16 }) }} {% endif %} <span class="toolbar-title__label"> {% block content %} {{ content }} {% endblock %} </span> </{{html_tag|default('h2')}}>
File
-
core/
modules/ navigation/ components/ title/ title.twig
View source
- {%
- set classes = [
- 'toolbar-title',
- ]
- %}
- {% if modifiers is iterable %}
- {% set classes = classes|merge(modifiers|map(modifier => "toolbar-title--#{modifier}")) %}
- {% endif %}
-
- {% if extra_classes is iterable %}
- {% set classes = classes|merge(extra_classes) %}
- {% endif %}
-
- <{{html_tag|default('h2')}}{{attributes.addClass(classes)}}>
- {% if icon %}
- {{ icon('navigation', icon, { class: 'toolbar-title__icon', size: 16 }) }}
- {% endif %}
- <span class="toolbar-title__label">
- {% block content %}
- {{ content }}
- {% endblock %}
- </span>
- </{{html_tag|default('h2')}}>
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.