views_collapsible_list-8.x-1.x-dev/templates/views-view-collapsible-list.html.twig

templates/views-view-collapsible-list.html.twig
{#
/**
* @file
* Template for the views style to display a list of expandable/collapsible rows.
*
* Available variables:
* - attributes: HTML attributes for the container.
* - rows: A list of rows for this list.
*   - attributes: The row's HTML attributes.
*   - content: The row's contents.
* - title: The title of this group of rows. May be empty.
* - list: @todo.
*   - type: Starting tag will be either a ul or ol.
*   - attributes: HTML attributes for the list element.
*
* @see template_preprocess_views_view_list()
*/
#}
{% if attributes -%}
  <div{{ attributes }}>
{% endif %}
  <button class="btn--list-collapse-action btn--collapse-all {{ section_class }}">{{ 'Collapse All'|t }}</button>
  <button class="btn--list-collapse-action btn--expand-all {{ section_class }}">{{ 'Expand All'|t }}</button>
  {% if title %}
    <h3>{{ title }}</h3>
  {% endif %}

    <ul{{ list.attributes }}>

  {% for row in rows %}
    <li{{ row.attributes }}>
      <span class="collapse-expand-toggle">&nbsp;</span>
      <div class="views-fields">{{ row.content }}</div>
    </li>
  {% endfor %}

    </ul>

{% if attributes -%}
  </div>
{% endif %}

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

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