templates/content/tmpl/roofing-galleries.html.twig line 1

Open in your IDE?
  1. {% extends "1-col-sidebar.html.twig" %}
  2. {% block column %}
  3.     {% if site_code == constant("App\\Entity\\Content::SITE_RCS") %}
  4.         {% include  "includes/curtain-ads/newForum.html.twig" %}
  5.     {% endif %}
  6.     {% if content.getShowTitle() %}
  7.         <h1>{{ content.getTitle() | raw }}</h1>
  8.     {% endif %}
  9.     {% if content.getFeaturedImageTag() %}
  10.         {{ content.getFeaturedImageTag("display-block","")|raw }}
  11.     {% endif %}
  12.     {# show full content #}
  13.     {% if content.getContentFull() is not empty %}
  14.         {{ content.getContentFull() | wordpress | raw }}
  15.     {% endif %}
  16.     {# show builder content #}
  17.     {#
  18.         {% if content.getContentBuilder() and content.getContentBuilder() != '{}' %}
  19.             {{ content.getContentBuilder() | builder | raw }}
  20.         {% endif %}
  21.         #}
  22.     <div class="clearfix">
  23.         <div class="row">
  24.             {% for gallery in galleries %}
  25.                 <div class="col-lg-4">
  26.                     <div class="gallerythumb" style="width:100%">
  27.                         <strong>
  28.                             {% if gallery.getMedia() %}
  29.                                 <a href="{{ gallery.getURL() }}">
  30.                                     {{gallery.getMedia().getImageTag()|raw}}
  31.                                 </a>
  32.                             {% else %}
  33.                                 {% set imgSet = false %}
  34.                                 {% for container in gallery.getMediaGroupContainers() %}
  35.                                     {% if container is not empty and not imgSet %}
  36.                                         {% set group = container.getMediaGroup() %}
  37.                                         {% for item in group.getMediaGroupItems() %}
  38.                                             {% if item and not imgSet %}
  39.                                                 {% set media = item.getMedia() %}
  40.                                                 {% if media %}
  41.                                                     {% set imgSet = true %}
  42.                                                     <a href="{{ gallery.getURL() }}">
  43.                                                         {{media.getImageTag()|raw}}
  44.                                                     </a>
  45.                                                 {% endif %}
  46.                                                 {#{% else %}#}
  47.                                                 {# set up a default image if no image is set #}
  48.                                             {% endif %}
  49.                                         {% endfor %}
  50.                                     {% endif %}
  51.                                 {% endfor %}
  52.                             {% endif %}
  53.                             <a href="{{ gallery.getURL() }}">
  54.                                 {{gallery.getTitle()}}
  55.                             </a>
  56.                         </strong>
  57.                     </div>
  58.                 </div>
  59.             {% endfor %}
  60.         </div>
  61.     </div>
  62. {% endblock %}