rivet-1.0.x-dev/templates/views/views-view-summary.html.twig

templates/views/views-view-summary.html.twig
{#
/**
 * @file
 * Theme override to display a list of summary lines.
 *
 * Available variables:
 * - rows: The rows contained in this view.
 *   Each row contains:
 *   - url: The summary link URL.
 *   - link: The summary link text.
 *   - count: The number of items under this grouping.
 *   - attributes: HTML attributes to apply to each row.
 *   - active: A flag indicating whether the row is active.
 * - options: Flags indicating how the summary should be displayed.
 *   This contains:
 *   - count: A flag indicating whether the count should be displayed.
 *
 * @see template_preprocess_views_view_summary()
 */
#}
{% if rows|length > 0 %}
{% set id = view.current_display|clean_id %}
<nav class="rvt-m-bottom-xl" aria-labelled-by="{{ id }}-label">
  <h2 class="rvt-sr-only" id="{{ id }}-label">Glossary</h2>
  <ul class="rvt-list-inline rvt-gap-xxs">
  {% for row in rows %}
    {% set classes = [
      'rvt-button rvt-button--small rvt-button--plain rvt-border-all-none',
      row.active ? 'rvt-color-white rvt-bg-crimson',
    ]
    %}
    <li>
      <a
        href="{{ row.url }}"
        {{ row.attributes.addClass(classes)|without('href') }}
        {{ row.active ? 'aria-current="page"' }}
      >{{ row.link }}</a>
      {% if options.count %}
        ({{ row.count }})
      {% endif %}
    </li>
  {% endfor %}
    <li>
      <a
        href="{{ view_all_link }}"
        class="rvt-button rvt-button--small rvt-button--plain rvt-border-all-none{{ is_all ? ' rvt-color-white rvt-bg-crimson' }}"
      >View All</a>
    </li>
  </ul>
</nav>
{% endif %}

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

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