zen-8.x-7.0-alpha15/STARTERKIT/components/navigation/breadcrumb/breadcrumb.twig

STARTERKIT/components/navigation/breadcrumb/breadcrumb.twig
{#
/**
 * @file
 * Component for a breadcrumb trail.
 *
 * Variables:
 * - modifier_class: [string] Classes to modify the default component styling.
 * - heading: [string] Accessible heading.
 * - breadcrumb: [array] The breadcrumb trail items. Each item is an object
 *   containing:
 *   - text: [string] Text of the item.
 *   - url: [string] URL of the item (optional).
 */
#}
{{ attach_library('STARTERKIT/breadcrumb') }}
<nav class="breadcrumb {{modifier_class}}" role="navigation" aria-labelledby="system-breadcrumb">
  <h2 id="system-breadcrumb" class="visually-hidden">{{ heading|default('You are here') }}</h2>
  <ol class="breadcrumb__list">
    {% for item in breadcrumb %}
      <li class="breadcrumb__item">
        {% if item.url %}
          <a href="{{ item.url }}">{{ item.text }}</a>
        {% else %}
          {{ item.text }}
        {% endif %}
        {% if not loop.last %}
          ›
        {% endif %}
      </li>
    {% endfor %}
  </ol>
</nav>

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc