src/Package/Openform/Front/Templates/RelictPack/item.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. {% block header %}
  9.     {% include "@openform_front_templates/_includes/_header_mak.html.twig" with {'langLinks' : (langLinks is defined ? langLinks), item : entity}  %}
  10. {% endblock %}
  11. {% block content %}    
  12.    
  13.     {% include "@openform_front_templates/_blocks_sections/block.html.twig" with { sections: openform_front_util.getSections(entity)|length > 0 ? openform_front_util.getSections(entity):''} %}
  14.     {% set mobile = openform_front_util.isMobileDevice() %}
  15.     {% if mobile %}
  16.         <h1 class="index-news__title--mobile">{{ entity.Translation[app.request.locale].titleHtml|raw }}</h1>
  17.     {% endif %}
  18.     <section class="collection index-news">
  19.         <div class="collection__wrapper index-news__wrapper container">
  20.             {% if mobile %}
  21.             {% else %}
  22.                 <h1 class="index-news__title--desktop">{{ entity.Translation[app.request.locale].titleHtml|raw }}</h1>
  23.             {% endif %}
  24.             {% set img = openform_front_util.getImagePathByType(entity.Thumb ?? '','detail') %}
  25.             {% if img %}
  26.                 <img class="collection__img" src="{{img}}" alt="{{ entity.Translation[app.request.locale].alt }}">
  27.             {% endif %}
  28.             <div class="collection__text block__text">
  29.                 {{ entity.Translation[app.request.locale].text }}
  30.             </div>
  31.             <div class="collection__items">
  32.                 {% for relict in entity.getVisibleRelicts(app.request.locale) %}
  33.                     
  34.                     {% set href = toolkit_route_localizer.generate('relict_item',{ slug : relict.Translation[app.request.locale].slug }, app.request.locale) %}
  35.                     
  36.                     <a class="collection__item" href="{{ href }}">
  37.                         
  38.                         {% set img = openform_front_util.getImagePathByType(relict.Thumb ?? '','detail') %}
  39.                         {% if img %}
  40.                             <img class="collection__item__img" src="{{img}}" alt="{{ relict.Translation[app.request.locale].alt }}">
  41.                         {% endif %}
  42.                         {% if relict.Translation[app.request.locale].title %}
  43.                             <div class="collection__item__title block__h4">{{ relict.Translation[app.request.locale].titleHtml|raw }}</div>
  44.                         {% endif %}
  45.                     </a>
  46.                 {% endfor %}
  47.             </div>
  48.         </div>
  49.     </section>
  50.             
  51.     {#{% include "@openform_front_templates/_blocks/_all_blocks.html.twig" with { blocks: entity.block }  %}#}
  52.     
  53.     {% include "@openform_front_templates/_includes/_image_slide.html.twig" with { entity: entity }  %}
  54. {% endblock %}