templates/includes/blocks.html.twig line 1

Open in your IDE?
  1. {% set title = content.title|default %}
  2. {% if content.blocks|default([])|length %}
  3.     {% set n = 0  %}
  4.     <section class="blocks-section">
  5.         {% for block in content.blocks %}
  6.             {% set n = n + 1 %}   
  7.            
  8.             {#<div class="blocks__item block-{{block.type}} pt-2" id="">#}
  9.                 {% if block.type =="texte" %}
  10.                 {% include 'includes/blocks/' ~ block.type ~ '.html.twig' with {
  11.                     content: block,
  12.                     view: view.blocks[loop.index0],
  13.                 } only %}
  14.                 {% elseif block.type =="image" and n == 1 %}
  15.                 {% elseif block.type =="faq" %}
  16.                    
  17.                 {% else %}
  18.                    
  19.                     <div class="blocks__item block-{{block.type}} " id="">
  20.                         {% include 'includes/blocks/' ~ block.type ~ '.html.twig' with {
  21.                         content: block,
  22.                         view: view.blocks[loop.index0],
  23.                     } only %}
  24.                     </div>
  25.                    
  26.                 {% endif %}
  27.             {#</div> #}
  28.           
  29.          
  30.         {% endfor %}
  31.         {% if title == 'Horaires & Tarifs' %}
  32.             <div class="row">
  33.                 <div class="col text-center pt-3 pb-3">
  34.                     <a href="/details" class="btn btn-link transition-bgcolor bg-green-s minw-sm">Réserver!</a>
  35.                 </div>
  36.             </div>
  37.         {% endif %}
  38.     </section>
  39.     
  40. {% endif %}
  41.  {% if  title == 'Faq'%} 
  42.         <div class="bloc-faq-page py-4">
  43.             <div class="max-container-4">
  44.             {% if content.blocks|default([])|length %}
  45.             <div class="faq-accordion pt-2" id="accordion">
  46.                 {% for block in content.blocks %}
  47.                     {% if block.type =="faq" %}
  48.                     {% include 'includes/blocks/' ~ block.type ~ '.html.twig' with {
  49.                         content: block,
  50.                         view: view.blocks[loop.index0],
  51.                     } only %}
  52.                     {% endif %}
  53.                 {% endfor %}
  54.             </div>
  55.             
  56.         {% endif %}
  57.         </div>
  58.     </div>
  59.     {% endif %}