templates/default/components/molecules/table/table.html.twig line 1

Open in your IDE?
  1. <div class="table">
  2. {% if headline is defined and headline is not empty %}
  3. {% include('components/atoms/headline/headline.html.twig') with {
  4. 'headlineTag': headlineTag|default('h3'),
  5. 'text': headline,
  6. 'class': 'headline--section'
  7. } %}
  8. {% endif %}
  9. <table class="table__data {{ class|default }}">
  10. {% if colHeaders|default([])|length > 0 %}
  11. <thead class="table__header--hidden">
  12. <tr>
  13. {% for header in colHeaders|default([]) %}
  14. <th scope="col">{{ header }}</th>
  15. {% endfor %}
  16. </tr>
  17. </thead>
  18. {% endif %}
  19. <tbody>
  20. {% for data in tableData %}
  21. <tr class="table__row">
  22. {% for item in data %}
  23. <td class="table__item">{{ item is iterable ? item|join(', ') : item|nl2br }}</td>
  24. {% endfor %}
  25. </tr>
  26. {% endfor %}
  27. </tbody>
  28. </table>
  29. </div>