templates/includes/partials/_list-text.html.twig line 1

Open in your IDE?
  1. {#
  2. usage:
  3. {% include 'includes/partials/_list-text.html.twig' with {
  4.     'listTextFieldName':'listText',
  5.     'listTextOverrideData': [ // Optioneel
  6.      'usp 1',
  7.      'usp 2',
  8.     ]}
  9.     %}
  10. #}
  11. {#@todo-frontend: figure out when to switch from one-column to two-column usp-list display? design has 3 in one column, and 8 in two columns. > 4 perhaps?#}
  12. {% if listTextOverrideData is defined %}
  13.     {# If a manual dataset is supplied from a product... #}
  14.     <ul class="md:mt-8 md:my-8 text-md {{ hideMarginTopMobile ? 'mt-0' : 'mt-8' }}">
  15.         {% for i in listTextOverrideData %}
  16.             <li class="flex mb-3 text-blue">
  17.                 <svg class="w-[24px] h-[18px] mr-3 shrink-0 mt-1.5" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 18">
  18.                     <path fill="currentColor" fill-rule="evenodd" d="M21.576 0 24 2.424l-6.562 6.562-7.655 7.655a1.71 1.71 0 0 1-2.422 0h-.002L0 9.28l2.425-2.424 6.147 6.148L21.576 0Z"/>
  19.                 </svg>
  20.                 <span>{{ i }}</span>
  21.             </li>
  22.         {% endfor %}
  23.     </ul>
  24. {% else %}
  25.     <!--manual mode-->
  26.     {# If no manual dataset is delivered, fallback to the manual mode #}
  27.     <ul class="md:mt-8 md:my-8 text-md {{ hideMarginTopMobile ? 'mt-0' : 'mt-8' }}">
  28.         {% for i in pimcore_block(listTextFieldName ?? 'listText').iterator %}
  29.             <li class="flex mb-3 text-blue">
  30.                 <svg class="w-[24px] h-[18px] mr-3 shrink-0 mt-1.5 " xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 18">
  31.                     <path fill="#0072BB" fill-rule="evenodd" d="M21.576 0 24 2.424l-6.562 6.562-7.655 7.655a1.71 1.71 0 0 1-2.422 0h-.002L0 9.28l2.425-2.424 6.147 6.148L21.576 0Z"/>
  32.                 </svg>
  33.                 <span>{{ pimcore_input('text', {'placeholder': "Vul hier een usp in."}) }}</span>
  34.             </li>
  35.         {% endfor %}
  36.     </ul>
  37. {% endif %}