templates/content/tmpl/1-col-sidebar.html.twig line 1

Open in your IDE?
  1. {# 1 column sidebar #}
  2. <div class="container content">
  3.     <div class="row">
  4.         <div class="col-12 col-md-9">
  5.             {{ render(controller(
  6.                 'App\\Controller\\Master\\ContentController::pinnedCurtainAd',
  7.                 {
  8.                     'base_url': app.request.getSchemeAndHttpHost(),
  9.                     'uri': app.request.getRequestUri(),
  10.                     'current_route': app.request.attributes.get('_route')
  11.                 }
  12.                 ))
  13.             }}
  14.         {#
  15.             {% set current_route = app.request.attributes.get('_route') %}
  16.             {% if site_code == constant("App\\Entity\\Content::SITE_RCS") %}
  17.                 {% if (content.getType() == constant("App\\Entity\\Content::THE_HUB") or content.getType() == constant("App\\Entity\\Content::WEBINAR") or content.getType() == constant("App\\Entity\\Content::EBOOK") or content.getType() == constant("App\\Entity\\Content::VIDEO")) %}
  18.                     {% include  "includes/curtain-ads/rlw.html.twig" %}
  19.                 {% endif %}
  20.                 {% if (
  21.                 (app.request.pathinfo == '/rcs-influencers') 
  22.                 or (app.request.pathinfo == '/rlw-news-header') 
  23.                 or (app.request.pathinfo == '/roofing-galleries') 
  24.                 or (app.request.pathinfo == '/news-room') 
  25.                 or (app.request.pathinfo == '/roofing-galleries') 
  26.                 or (app.request.pathinfo == '/rcs-weekly-newsletters-week-review') 
  27.                 or (app.request.pathinfo == '/roofing-galleries') 
  28.                 or (app.request.pathinfo == '/trends-report-results')
  29.                 or (app.request.pathinfo == '/forum-news-header')) %}
  30.                     {% include  "includes/curtain-ads/newForum.html.twig" %}
  31.                 {% endif %}
  32.                 {% if ((app.request.pathinfo == '/what-is-r-club') 
  33.                 or (app.request.pathinfo == '/members-only') 
  34.                 or (app.request.pathinfo == '/consulting') 
  35.                 or (app.request.pathinfo == '/new-club-member') 
  36.                 or (app.request.pathinfo == '/rcs-club-sign-up') 
  37.                 or (app.request.pathinfo == '/handy-forms') 
  38.                 or (app.request.pathinfo == '/sign-up') 
  39.                 or (app.request.pathinfo == '/roofers-safety-information')
  40.                 or (app.request.pathinfo == '/coffee-break')
  41.                 or (app.request.pathinfo == '/roofer-of-the-month')
  42.                 or current_route == "r-club-perk"
  43.                 ) %}
  44.                     {% include  "includes/curtain-ads/rclub.html.twig" %}
  45.                 {% endif %}
  46.                 { # information on section # }
  47.                 {% if (
  48.                     (app.request.pathinfo == '/opportunities') or (app.request.pathinfo == '/promos-rebates') 
  49.                 or     (app.request.pathinfo == '/buy-online') or (app.request.pathinfo == '/quick-quiz')
  50.                 or     (app.request.pathinfo == '/contests-and-games') or (app.request.pathinfo == '/take-our-survey')
  51.                 or     (app.request.pathinfo == '/rcs-photo-contest') or (app.request.pathinfo == '/information-on')
  52.                 or     (app.request.pathinfo == '/roofing') or (app.request.pathinfo == '/information-on')
  53.                 or     (app.request.pathinfo == '/product-information/roofing-technology') or (app.request.pathinfo == '/scholarships')
  54.                 or     (app.request.pathinfo == '/vocational-schools') or (app.request.pathinfo == '/events')
  55.                 or     (app.request.pathinfo == '/add-us') or (app.request.pathinfo == '/building-owners')
  56.                 or     (app.request.pathinfo == '/safety-tip-of-the-week') or (app.request.pathinfo == '/product-information')
  57.                 or     (app.request.pathinfo == '/training-resources') or (app.request.pathinfo == '/capacitacion-en-espanol')
  58.                 or     (app.request.pathinfo == '/advocacy') or (app.request.pathinfo == '/trade-roofing-associations')
  59.                 or     (app.request.pathinfo == '/rcs-cares') or (app.request.pathinfo == '/look-up')
  60.                 or     (app.request.pathinfo == '/join-roofing-industry') or (app.request.pathinfo == '/awards')
  61.                 or     (app.request.pathinfo == '/giving-back') or (app.request.pathinfo == '/veterans')
  62.                 or     (app.request.pathinfo == '/about-us') or (app.request.pathinfo == '/advertise-on-rcs')
  63.                 or     (app.request.pathinfo == '/canada-content') or (app.request.pathinfo == '/rcs-en-espanol')
  64.                 or     (app.request.pathinfo == '/meet-the-team') or (app.request.pathinfo == '/partners')
  65.                 or     (app.request.pathinfo == '/how-tos') or (app.request.pathinfo == '/contact-us')
  66.                 or     (current_route == 'promos') or (current_route == 'contests')
  67.                 or     (current_route == 'scholarship') or (current_route == 'event')
  68.                 or     (current_route == 'award')
  69.                 ) %}
  70.                     {% include  "includes/curtain-ads/information.html.twig" %}
  71.                 {% endif %}
  72.             {% endif %}
  73.         #}
  74.             {% if content.getShowTitle() %}
  75.                 <h1>{{ content.getTitle() | raw }}</h1>
  76.             {% endif %}
  77.             {% if content.getFeaturedImageTag() %}
  78.                 {% if content.getMediaURL() %}<a href="{{content.getMediaURL()}}">{% endif %}
  79.                     {% if site_code is defined and site_code == constant("App\\Entity\\Content::SITE_AAR") %}
  80.                         {# center image on AAR #}
  81.                         <div class="post-thumbnail">
  82.                             {{ content.getFeaturedImageTag("", "max-height: 450px")|raw }}
  83.                         </div>
  84.                     {% else %}
  85.                         {#{% if current_route == 'ebook' %}#}
  86.                         {% if app.request.attributes.get('_route') == 'ebook' %}
  87.                             {{ content.getFeaturedImageTag("display-block","max-width: 40%")|raw }}
  88.                         {% else %}
  89.                             {{ content.getFeaturedImageTag("display-block","")|raw }}
  90.                         {% endif %}
  91.                     {% endif %}
  92.                     {% if content.getMediaURL() %}</a>{% endif %}
  93.             {% endif %}
  94.             {# show full content #}
  95.             {% if content.getContentFull() is not empty %}
  96.                 {{ content.getContentFull() | wordpress | raw }}
  97.             {% endif %}
  98.             {# show builder content #}
  99.             {% if content.getContentBuilder() and content.getContentBuilder() != '{}' %}
  100.                 {{ content.getContentBuilder() | builder | raw }}
  101.             {% endif %}
  102.             {# show module content #}
  103.             {% set page = content %}
  104.             {% set modules = content.getContentMetaValueByKey("mtm_content_modules") %}
  105.             {% if modules is not empty %}
  106.                 {# { modules } #}
  107.                 {% set modules = unserialize(modules) %}
  108.                 {% include "content/tmpl/mtm-module-loop.html.twig" %}
  109.             {% endif %}
  110.             {# the hub link types - TODO - find better place for these exceptions #}
  111.             {% if content.getType() == constant("App\\Entity\\Content::THE_HUB") %}
  112.                 {% set videoLink = content.getContentMetaValueByKey("rcs_learning_center_video") %}
  113.                 {% if videoLink is not empty %}
  114.                     <p>
  115.                         <a href="{{ videoLink }}">
  116.                             <i class="fa fa-play-circle"></i>
  117.                             Click here to view the video.</a>
  118.                     </p>
  119.                 {% endif %}
  120.                 {#social share buttons#}
  121.             {% endif %}
  122.             {# webinar links - TODO - find better place for these exceptions #}
  123.             {% if content.getType() == constant("App\\Entity\\Content::WEBINAR") %}
  124.                 {% set webinarLink = content.getContentMetaValueByKey("webinar_hostandguest") %}
  125.                 {% if webinarLink is not empty %}
  126.                     {{ webinarLink | raw }}
  127.                 {% endif %}
  128.             {% endif %}
  129.             {% if content.getScriptTag() %}
  130.                 {{ content.getScriptTag() | wordpress | raw }}
  131.             {% endif %}
  132.             {% if content.getType() == constant("App\\Entity\\Content::EBOOK") or 
  133.                 content.getType() == constant("App\\Entity\\Content::AWARD") or 
  134.                 content.getType() == constant("App\\Entity\\Content::VIDEO") or 
  135.                 content.getType() == constant("App\\Entity\\Content::WEBINAR") or
  136.                 content.getType() == constant("App\\Entity\\Content::CONTEST_GAMES") or
  137.                 content.getType() == constant("App\\Entity\\Content::PAGE") or
  138.                 content.getType() == constant("App\\Entity\\Content::PROMOS_REBATES") or 
  139.                 content.getType() == constant("App\\Entity\\Content::R_CLUB_PERK") or
  140.                 content.getType() == constant("App\\Entity\\Content::THE_HUB") or
  141.                 content.getType() == constant("App\\Entity\\Content::SCHOLARSHIP")
  142.                  %}
  143.                 {#social share buttons#}
  144.                 {% include "includes/social-share.html.twig" %}
  145.             {% endif %}
  146.             {# /partner-galleries #}
  147.             {% set mtm_grid = content.getContentMetaValueByKey("mtm_grid_archive_manual") %}
  148.             {% set mtm_cols = content.getContentMetaValueByKey("mtm_grid_archive_per_row") %}
  149.             {% if mtm_cols is empty %}
  150.                 {% set mtm_cols = 3 %}
  151.             {% endif %}
  152.             {% if mtm_grid is not empty %}
  153.                 {% set mtm_grid = unserialize(mtm_grid) %}
  154.                 {% set grid_count = 0 %}
  155.                 <div class="row my-3">
  156.                     {% for gal_id in mtm_grid %}
  157.                         {% if grid_count is divisible by(mtm_cols) %}
  158.                         </div>
  159.                         <div class="row my-3">
  160.                         {% endif %}
  161.                         <div class="col-md-{{ 12 / mtm_cols }}">
  162.                             {% set gal = get_entity("Content", "old_id", gal_id) %}
  163.                             <a href="{{ gal.getURL() }}">
  164.                                 {{ gal.getFeaturedImageTag("","")|raw }}
  165.                                 <br/>
  166.                                 {{ gal.getTitle() }}
  167.                             </a>
  168.                         </div>
  169.                         {% set grid_count = grid_count + 1 %}
  170.                     {% endfor %}
  171.                 </div>
  172.             {% endif %}
  173.             {% block bottom %}
  174.                 {% include "includes/bottom.html.twig" %}
  175.             {% endblock %}
  176.         </div>
  177.         <div class="col-md-3 d-none d-md-block">
  178.             {% include "includes/sidebar.html.twig" %}
  179.         </div>
  180.     </div>
  181. </div>