templates/includes/product/detail-table-horizontal.html.twig line 1

Open in your IDE?
  1. {% set th = th|default([]) %}
  2. {% set td = td|default([]) %}
  3. <h3>{{ 'product.detail.Table'|trans }}</h3>
  4. <table class="table">
  5.     <thead>
  6.     <tr>
  7.         {% for heading in th %}
  8.             {% if heading matches '/{asset\|(\w+)}/' %}
  9.                 <th>
  10.                     {% set id = heading|split('|')|last|split('}')|first %}
  11.                     <span class="icon icon-{{ id }}"></span>
  12.                     {{ ('product.detail.palfinger.icon-' ~ id)|trans }}
  13.                 </th>
  14.             {% else %}
  15.                 <th>{{ heading|trans }}</th>
  16.             {% endif %}
  17.         {% endfor %}
  18.     </tr>
  19.     </thead>
  20.     <tbody>
  21.     {% for row in td %}
  22.         <tr>
  23.             {% for value in row %}
  24.                 {% set tk = 'product.detail.palfinger.' ~ th[loop.index0]|split('|')|last|split('}')|first ~ '-suffix' %}
  25.                 <td>{{ value }} {{ ((tk == tk|trans) and (not app.request.get('pimcore_debug_translations'))) ? '' : tk|trans|raw }}</td>
  26.             {% endfor %}
  27.         </tr>
  28.     {% endfor %}
  29.     </tbody>
  30. </table>