templates/Slivki/offers/category_page.html.twig line 1

Open in your IDE?
  1. {% extends 'Slivki/index.html.twig' %}
  2. {% block title %}{{ parent() }}{{ currentPage is defined and currentPage != 1 ? ' - Страница №' ~ currentPage }}{% endblock %}
  3. {% block left_sidebar %}
  4.     {% if constant('\\Slivki\\Entity\\Category::NEW_YEAR_CATEGORY_ID') == categoryID %}
  5.         {{ getSidebar(constant('\\Slivki\\Entity\\Category::NEW_YEAR_SALE_CATEGORY_ID')) }}
  6.     {% else %}
  7.         {{ parent() }}
  8.     {% endif %}
  9. {% endblock %}
  10. {% block mainColumnClass %}{{ parent() }}category-page{% endblock %}
  11. {% block topContentBlock %}
  12.     {% if tourismHotFeed is defined and tourismHotFeed|length > 0 %}
  13.         <div class="top-content-block clearfix category-hotfeed-wrapper">
  14.             <div id="mainHotFeed">
  15.                 <div class="title"><i>&nbsp;</i> ГОРЯЩИЕ И НОВЫЕ ТУРЫ</div>
  16.                 <div class="tourism-hotfeed swiper-container" id="mainHotFeedSlider" data-offset="0" data-type="{{ constant('Slivki\\Entity\\HotFeed::TYPE_OFFER_TOURISM_PAGE') }}">
  17.                     <div class="swiper-wrapper">
  18.                         {{ tourismHotFeed|raw }}
  19.                     </div>
  20.                     <div class="swiper-button swiper-button-prev"></div>
  21.                     <div class="swiper-button swiper-button-next"></div>
  22.                 </div>
  23.             </div>
  24.         </div>
  25.     {% endif %}
  26. {% endblock %}
  27. {% block main_content %}
  28.     {# rodenTeaserBannerABTest #}
  29.     {% if categoryID == constant('Slivki\\Entity\\Category::TOP_CATEGORY_ID') %}
  30.         {% set abValue = app.session.get('rodenTeaserBannerABTest', '0') %}
  31.         {% set utmCampaign = 'utm_campaign=abw-woman' %}
  32.         {% set imgUri = '/roden-lady.jpg' %}
  33.         {% if abValue == 0 %}
  34.             {% set utmCampaign = 'utm_campaign=abw-vip' %}
  35.             {% set imgUri = '/roden-vip.jpg' %}
  36.             {{ app.session.set('rodenTeaserBannerABTest', 1) }}
  37.         {% else %}
  38.             {{ app.session.set('rodenTeaserBannerABTest', 0) }}
  39.         {% endif %}
  40.         {% set category = category|replace({'utm_campaign=roden_pop': utmCampaign, '/slivki-img/1496324948_.jpg': imgUri}) %}
  41.         {% set categoryBanner = app.user and app.user.hasRole(constant('\\Slivki\\Entity\\UserGroup::ROLE_ADS_FREE')) ? ''
  42.             : getCategoryBanner(categoryID) %}
  43.         {% set category = category|replace({'<div id="category-banner-placeholder" style="display:none"></div>': categoryBanner}) %}
  44.     {% endif %}
  45.     {# end rodenTeaserBannerABTest #}
  46.     {{ category|raw }}
  47.     {% if lastMonthPurchaseCount is defined %}
  48.         <input id="lastMonthPurchaseCount" type="hidden" value="{{ lastMonthPurchaseCount|json_encode }}">
  49.     {% endif %}
  50. {% endblock %}
  51. {% block javascripts %}
  52.     {{ parent() }}
  53. {#        <script src="//api-maps.yandex.ru/2.1.29/?lang=ru-RU" type="text/javascript"></script>#}
  54.         <script src="//mourner.github.io/simplify-js/simplify.js"></script>
  55.         <script type="text/javascript" src="//yastatic.net/share2/share.js" charset="utf-8"></script>
  56.         <script type="module" src="/js/category.js?v={{ category_js_version }}" type="text/javascript"></script>
  57.         <script type="module" type="text/javascript" src="/js/work_examples/work_examples.js?v={{ work_examples_js_version }}"></script>
  58. {% endblock %}
  59. {% block RTBHouse %}
  60.     {% if categoryID == constant('Slivki\\Entity\\Category::NEW_OFFER_CATEGORY_ID') %}
  61.         <script>
  62.             try{ (function() {
  63.                 var prefix = "", hash = "TS5TS2S9bdSbgKBA4Q2H", rtbhTags = []; rtbhTags.push("pr_"+hash+"_newoffers"); rtbhTags.push("pr_"+hash+"_uid_"+document.getElementById('rtbhUID').value);
  64.                 var key = "__rtbhouse.lid", lid = window.localStorage.getItem(key); if (!lid) {
  65.                     lid = ""; var pool = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
  66.                     for (var i = 0; i < 20; i++) lid += pool.charAt(Math.floor(Math.random() * pool.length)); window.localStorage.setItem(key, lid);}
  67.                 rtbhTags.push("pr_"+hash+"_lid_" + lid);
  68.                 var ifr = document.createElement("iframe"),
  69.                     sr = encodeURIComponent(document.referrer ? document.referrer : ""),
  70.                     su = encodeURIComponent(document.location.href ? document.location.href : ""),
  71.                     ifrSrc = "https://"+prefix+"creativecdn.com/tags?type=iframe", tmstmp = encodeURIComponent("" + Date.now()); for(var i=0; i<rtbhTags.length; i++) {ifrSrc += "&id=" + encodeURIComponent(rtbhTags[i]);}
  72.                 ifrSrc += "&su=" + su + "&sr=" + sr + "&ts=" + tmstmp;
  73.                 ifr.setAttribute("src", ifrSrc); ifr.setAttribute("width", "1");
  74.                 ifr.setAttribute("height", "1"); ifr.setAttribute("scrolling", "no");
  75.                 ifr.setAttribute("frameBorder", "0"); ifr.setAttribute("style", "display:none");
  76.                 ifr.setAttribute("referrerpolicy", "no-referrer-when-downgrade"); if(document.body){document.body.appendChild(ifr);}
  77.                 else{window.addEventListener('DOMContentLoaded', function(){document.body.appendChild(ifr);});}
  78.             })();} catch(e) {} </script>
  79.     {% else %}
  80.         <script>
  81.             try{ (function() {
  82.                 var prefix = "", hash = "TS5TS2S9bdSbgKBA4Q2H", rtbhTags = []; rtbhTags.push("pr_"+hash+"_category2_"+document.getElementById('categoryID').value); rtbhTags.push("pr_"+hash+"_uid_"+document.getElementById('rtbhUID').value);
  83.                 var key = "__rtbhouse.lid", lid = window.localStorage.getItem(key); if (!lid) {
  84.                     lid = ""; var pool = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
  85.                     for (var i = 0; i < 20; i++) lid += pool.charAt(Math.floor(Math.random() * pool.length)); window.localStorage.setItem(key, lid);}
  86.                 rtbhTags.push("pr_"+hash+"_lid_" + lid);
  87.                 var ifr = document.createElement("iframe"),
  88.                     sr = encodeURIComponent(document.referrer ? document.referrer : ""),
  89.                     su = encodeURIComponent(document.location.href ? document.location.href : ""),
  90.                     ifrSrc = "https://"+prefix+"creativecdn.com/tags?type=iframe", tmstmp = encodeURIComponent("" + Date.now()); for(var i=0; i<rtbhTags.length; i++) {ifrSrc += "&id=" + encodeURIComponent(rtbhTags[i]);}
  91.                 ifrSrc += "&su=" + su + "&sr=" + sr + "&ts=" + tmstmp;
  92.                 ifr.setAttribute("src", ifrSrc); ifr.setAttribute("width", "1");
  93.                 ifr.setAttribute("height", "1"); ifr.setAttribute("scrolling", "no");
  94.                 ifr.setAttribute("frameBorder", "0"); ifr.setAttribute("style", "display:none");
  95.                 ifr.setAttribute("referrerpolicy", "no-referrer-when-downgrade"); if(document.body){document.body.appendChild(ifr);}
  96.                 else{window.addEventListener('DOMContentLoaded', function(){document.body.appendChild(ifr);});}
  97.             })();} catch(e) {} </script>
  98.     {% endif %}
  99. {% endblock %}