templates/pages/aside-element.html.twig line 1

Open in your IDE?
  1. {% set sortedItems = [] %}
  2. {% for child in sulu_navigation_root_tree(type, 3, true) %}
  3.     {% set icon = '' %}
  4.     {% set tmpUrl = sulu_content_path(child.url) %}
  5.     {% for item in child.excerpt.icon %}
  6.         {% if item.url is defined and item.url is not empty %}
  7.             {% set icon = item %}
  8.         {% endif %}
  9.     {% endfor %}
  10.     {% if theme is defined and theme is not empty %}
  11.         {% set url = tmpUrl ~ "?theme=" ~ theme ~ "&themeName=" ~ app.request.attributes.get('structure').document.title|url_encode %}
  12.         {% set sortedItems = sortedItems|merge([{
  13.                     'title': child.title,
  14.                     'url': url,
  15.                     'icon': icon,
  16.                 }]) %}
  17.     {% endif %}
  18. {% endfor %}
  19. <div class="navigation-count {{type}}">
  20.     <h2 class="fs50 lh36 fw400 ressources-title mb-20px">
  21.         {{ title is defined ? title : 'Ressources associées' }}
  22.     </h2>
  23.   <div class="dflex fwwrap">
  24.     {% for item in sortedItems %}
  25.         <a href="{{ item.url }}" class="mb-20px aside-menu-elem cwhite nodeco fw400 lh32 diflex aic br8 shadow-standard">
  26.             {% if item.icon %}
  27.                 <img src="{{ item.icon.formats['300x'] }}" alt="" width={{item.icon.fileVersion.properties.width}} height={{item.icon.fileVersion.properties.height}} loading="lazy">
  28.             {% endif %}
  29.             <span>{{ item.title }}</span>
  30.         </a>
  31.     {% endfor %}
  32.     {% if withKiosque is defined and withKiosque %}
  33.         <a href="https://kiosque.pqn-a.fr/inscription" class="mb-20px aside-menu-elem cwhite nodeco fw400 lh32 diflex aic br8 shadow-standard">{{ source('svg/newsletter-logo.html.twig') }}<span>Abonnez-vous à la lettre d'information</span>
  34.         </a>
  35.     {% endif %}
  36.   </div>
  37. </div>