templates/adsHeader.html.twig line 1

Open in your IDE?
  1. {% set hiddenAdsHeaderRoutes = ['homepage', 'aqarmap_buy_credit', 'aqarmap_credit_packages', 'aqarmap_credit_transaction', 'listing_initialize', 'listing_confirm_featured_credit', 'aqarmap_agents_search', 'aqarmap_agents_search_with_location'] %}
  2. {% set isMobile = isMobileAgent(app.request.headers.get('User-Agent')) %}
  3. {% set showAdsHeader = false %}
  4. {% if app.request.attributes.get('_route') not in hiddenAdsHeaderRoutes %}
  5.     {% if (isMobile and isEnabledFeature('web.mobile.search.adsheader')) or (not isMobile and isEnabledFeature('web.search.adsheader')) %}
  6.         {% set showAdsHeader = true %}
  7.     {% endif %}
  8. {% endif %}
  9. {% if showAdsHeader %}
  10. <div class="header container ads-header margin-header">
  11.     <div class="row">
  12.         <div class="col-xs-12 col-md-12 ad_container" style="overflow-x: hidden;">
  13.             {% if app.environment == 'dev' %}
  14.                 <div class=" flip">
  15.                     <img src="http://placehold.it/1456x180/FCFCFC/B6B6B6&amp;text=AD%20BANNER%20(728%20X%20150)" alt="AD BANNER (728X150)" width="728" height="150">
  16.                 </div>
  17.             {% else %}
  18.                 {% if get_setting('general', 'country') == 'SA' %}
  19.                     <div id='div-gpt-ad-1611048992201-0' style='width: 1140px; height: 225px;'>
  20.                         <script type="application/javascript" v-pre defer>
  21.                             if (typeof googletag !== 'undefined') {
  22.                                 googletag.cmd.push(function() { googletag.display('div-gpt-ad-1611048992201-0'); });
  23.                             }
  24.                         </script>
  25.                     </div>
  26.                 {% else %}
  27.                     <div id='div-gpt-ad-1588539416603-0' style='width: 1140px; height: 225px;'>
  28.                         <script type="application/javascript" v-pre defer>
  29.                             if (typeof googletag !== 'undefined') {
  30.                                 googletag.cmd.push(function() { googletag.display('div-gpt-ad-1588539416603-0'); });
  31.                             }
  32.                         </script>
  33.                     </div>
  34.                 {% endif %}
  35.             {% endif %}
  36.         </div>
  37.     </div>
  38. </div>
  39. {% endif %}