Same filename and directory in other branches
  1. 8.x-3.x templates/quicktabs-view-quicktabs.html.twig 1 comment

Theme override to display a view of unformatted rows.

Available variables:

  • title: The title of this group of rows. May be empty.
  • rows: A list of the view's row items.
    • attributes: The row's HTML attributes.
    • content: The row's content.
  • view: The view object.
  • default_row_class: A flag indicating whether default classes should be used on rows.

See also

template_preprocess_views_view_unformatted()

File

templates/quicktabs-view-quicktabs.html.twig

View source
  1. {#
  2. /**
  3. * @file
  4. * Theme override to display a view of unformatted rows.
  5. *
  6. * Available variables:
  7. * - title: The title of this group of rows. May be empty.
  8. * - rows: A list of the view's row items.
  9. * - attributes: The row's HTML attributes.
  10. * - content: The row's content.
  11. * - view: The view object.
  12. * - default_row_class: A flag indicating whether default classes should be
  13. * used on rows.
  14. *
  15. * @see template_preprocess_views_view_unformatted()
  16. */
  17. #}
  18. {{ attach_library('quicktabs/quicktabs') }}
  19. {% set last_index = total_rows - 1 %}
  20. {% if title %}
  21. <h3>{{ title }}</h3>
  22. {% endif %}
  23. {% for key, row in rows %}
  24. {% if key in rows_with_tabs %}
  25. {{ tabs }}
  26. <div class="quicktabs-main" id="quicktabs-container-{{ quicktab_id }}">
  27. {% endif %}
  28. {% if key in rows_with_page_starts %}
  29. {% for page_key, page in rows_with_page_starts %}
  30. {% if key == page %}
  31. <div class="quicktabs-tabpage{{ page_key > 0 ? ' quicktabs-hide' : '' }}" id="quicktabs-tabpage-{{ quicktab_id }}-{{ page_key }}"> <!-- start of tbapage -->
  32. {% set page_number = page_key %}
  33. {% endif %}
  34. {% endfor %}
  35. {% endif %}
  36. {{ row.content }}
  37. {% if key in rows_with_page_endings %}
  38. {# close .quicktabs-tabpage #}
  39. </div>
  40. {% endif %}
  41. {% if key == last_index %}
  42. {# close .quicktabs-main #}
  43. </div>
  44. {% endif %}
  45. {% endfor %}