src/Package/Openform/Front/Templates/Sitemap/index.html.twig line 1

Open in your IDE?
  1. {% extends "@openform_front_templates/base.html.twig" %}
  2. {% block bodyAttr %}data-page="detail-page"{% endblock %}
  3. {% set pageSubTitle = entity.Translation[app.request.locale].title %}
  4. {% set metaTitle = entity.Translation[app.request.locale].metaTitle ? entity.Translation[app.request.locale].metaTitle : entity.Translation[app.request.locale].title %}
  5. {% set metaDescription = entity.Translation[app.request.locale].metaDescription %}
  6. {% set metaKeywords = entity.Translation[app.request.locale].metaKeywords %}
  7. {% set pageImage = entity.imagePath ? openform_front_util.getImagePathByType(entity.Thumb,'list') : '' %}
  8. {% macro tree(data) %}
  9.     <div style="padding:0px 0 15px 25px;">
  10.         {% for i in data %}
  11.             {{ i.bullet }}
  12.             <a 
  13.                 href="{{ i.url }}"
  14.                 title="{{ i.metaTitle }}"
  15.             >
  16.                 {{ i.title }}
  17.             </a>
  18.             <br>
  19.             {% if i.children %}
  20.                 {{ _self.tree(i.children) }}
  21.             {% endif %}
  22.         {% endfor %}
  23.     </div>
  24. {% endmacro %}
  25. {% block content %}
  26.     {% include "@openform_front_templates/_blocks_sections/block.html.twig" with { sections: openform_front_util.getSections(entity)|length > 0 ? openform_front_util.getSections(entity)|slice(0, 1) : '' } %}
  27.     <section class="text-block" data-scroll-section>      
  28.         <div class="text-block__wrapper container">
  29.             <h2 class="text-block__title home-title">
  30.                 Mapa strony:
  31.             </h2>
  32.             <div class="text-block__inner">
  33.                 <div class="text-block__content" style="line-height:200%;font-size:120%;padding-top:20px;">
  34.                     {{ _self.tree(sitemap) }}
  35.                 </div>
  36.             </div>
  37.         </div>
  38.     </section>
  39.     {% include "@openform_front_templates/_blocks_sections/block.html.twig" with { sections: openform_front_util.getSections(entity)|length > 0 ? openform_front_util.getSections(entity)|slice(1, openform_front_util.getSections(entity)|length) : '' } %}
  40. {% endblock %}