templates/blocks/previews-from-controller/blocks/categoriesExperience.html.twig line 1

Open in your IDE?
  1. {% if categories is defined and categories is not empty and categories|length > 0 %}
  2.     <div class="thematique-container dflex fwwrap mt-8px mb-10px">
  3.         {% for category in categories %}
  4.             {% set this_category = load_category_by_id(category, 'fr') %}
  5.             {% if this_category.entity.pageLink.href is defined and this_category.entity.pageLink.href is not empty and sulu_content_load(this_category.entity.pageLink.href).content is defined and sulu_content_load(this_category.entity.pageLink.href).content['url'] is defined and sulu_resolve_category_parent_name(this_category.entity.key) == 'thematiques'%}
  6.                 {% set page = sulu_content_load(this_category.entity.pageLink.href).content['url'] %}
  7.             {% endif %}
  8.             {% if this_category.entity.pageLink.href is defined and this_category.entity.pageLink.href is not empty and page is defined and page is not empty %}
  9.                 <a href="{{ page }}" class="nodeco">
  10.                 {% endif %}
  11.                 {% if this_category.id is defined and this_category.id is not empty and sulu_resolve_category_parent_name(this_category.entity.key) == 'thematiques' %}
  12.                     <div class="thematiques-tag cwhite fw500 dflex aic" style="background: {{this_category.entity.color}}">
  13.                         {{this_category.entity.translations[0].translation}}
  14.                     </div>
  15.                 {% endif %}
  16.                 {% if this_category.pageLink is defined and this_category.pageLink is not empty and page is defined and page is not empty and sulu_resolve_category_parent_name(this_category.entity.key) == 'thematiques' %}
  17.                 </a>
  18.             {% endif %}
  19.         {% endfor %}
  20.     </div>
  21. {% endif %}