templates/Content/portal.html.twig line 1

Open in your IDE?
  1. {% extends 'views/product.html.twig' %}
  2. {% block content %}
  3. <div id="site-announcemment-block" class="clearfix">
  4.     {% if editmode %}
  5.     
  6.     {{ pimcore_checkbox("announce-hide-show", {'label': 'Hide/Show Announcement'}) }}
  7.     {{ pimcore_input("site-announcemment", {
  8.         "class":"x-form-text-default mt-10", 
  9.         "placeholder":"Site Announcement"
  10.     }) }}
  11.     
  12. {% else %} 
  13.     {% if not pimcore_checkbox("announce-hide-show").isChecked() %}
  14.         <div class="marquee-cover">
  15.             <div class="container">
  16.                 <!-- <span>Announcements</span> -->
  17.                 <div class="marquee">
  18.                     <p>{{ pimcore_input("site-announcemment") }}</p>
  19.                 </div>
  20.             </div>
  21.         </div>
  22.     {% endif %}
  23. {% endif %}
  24. </div>
  25. {% if not editmode %}
  26.     <section class="main-carousel">
  27. {% endif %}
  28.     {% set myBlock = pimcore_block('contentblock', {'reload': true}) %}
  29.     {% for block in myBlock.iterator %}
  30.         {% if editmode %}
  31.           {{ pimcore_image("marqueeImage", {"thumbnail": "sliderImage-scale","title": "Drag your image here","width": 200,"height": 200}) }}
  32.         {% endif %}
  33.          {% set img = pimcore_image("marqueeImage").getSrc() %}
  34.         <div style="background-image: url({{ img }}); cursor: pointer" {% if pimcore_link("marqueeButton").getTarget() == "_blank" and not editmode %} onclick="window.open('{{ pimcore_link("marqueeButton").getHref() }}');" {% elseif not editmode %} onclick="location.href='{{ pimcore_link("marqueeButton").getHref() }}';"{% endif %}> 
  35.           <div class="content" >
  36.               <div class="container row">
  37.                   <div class="section-text">
  38.                     <h1 class="header">
  39.                       {% if pimcore_input("headline") or editmode %}<span class="marquee-header">{{ pimcore_input("headline") }}</span>{% endif %}
  40.                     </h1>
  41.                     {% if pimcore_input("subline") or editmode %}<p class="subheader">{{ pimcore_input("subline") }}</p>{% endif %}
  42.                     {% if pimcore_link("marqueeButton").getText() or editmode %}{{ pimcore_link("marqueeButton", {'class': 'sublink'}) }}{% endif %}
  43.                 </div>
  44.             </div>
  45.           </div>
  46.         </div>
  47.     {% endfor %}
  48. {% if not editmode %}
  49.     </section>
  50. {% endif %}
  51. {% set classes = "front-panels" %}
  52. {% if editmode %}
  53. {% set heading = '<h4 class="mt-40">Please Add Your Image-Text Blocks</h4>' %}
  54. {% set classes = "" %}
  55. {% endif %}
  56. <section class="banner-img-txt-panel text-center clearfix {{ classes }}">
  57.     {{ heading }}
  58.     {% for bannerPanel in pimcore_block("banner-panel").iterator %}
  59.         {% set blockWidth = pimcore_input("banner-panel-width").getValue() %}
  60.             {% if blockWidth is empty or editmode %}
  61.             {% set blockWidth = '100' %}
  62.         {% endif %}
  63.              {% set blockWidth = blockWidth ~ '%' %}
  64.             {% set panelCoverimgUrl = '' %}
  65.             {% set panelBodyimgUrl = '' %}
  66.             {% if not editmode %}
  67.                 {% if pimcore_checkbox("text-hide-show").isChecked() %}
  68.                     {% set panelBodyimgUrl = pimcore_image("banner-panel-image").getThumbnail('imagePanel') %}
  69.                 {% else %}
  70.                     {# {% set panelCoverimgUrl = pimcore_image("banner-panel-image").getThumbnail('imagePanel') %} #}
  71.                     
  72.                 {% endif %}
  73.             {% endif %}
  74.             
  75.         
  76.         <div class="panel-cover" style="width:{{ blockWidth }}">
  77.             <div class="panel panel-default" style="background-image: url({{ panelCoverimgUrl }})">
  78.                 {% if not editmode and  pimcore_input("banner-panel-url").getValue() is not empty %}
  79.                     <a target="_blank" href=""></a>
  80.                 {% endif %}
  81.                 {% if editmode %}
  82.                     <div class="panel-body">
  83.                         <label class="text-left w-100"><strong>Section Url (http://):</strong></label>
  84.                         {{ pimcore_input("banner-panel-url", {"class" : "x-form-text-default light-bg text-left mb-10","placeholder" : "Url"}) }}
  85.                         <label class="text-left w-100"><strong>Section Width (%):</strong></label>
  86.                         {{ pimcore_input("banner-panel-width", { "class" :"x-form-text-default light-bg text-left mb-10","placeholder" : "Set Width in percentage(%)" }) }}
  87.                         {{ pimcore_image("banner-panel-image", { 'thumbnail': 'imagePanel', 'hidetext': true, 'width': 250, 'height': 150, 'title': 'Drag your image here' }) }}
  88.                         <div class="text-left">
  89.                             {{ pimcore_checkbox("text-hide-show", { 'label': 'Hide/Show TextBox', 'reload': true }) }}
  90.                         </div>
  91.                         
  92.                     </div>
  93.                 {% else %}
  94.                     <div class="panel-image" style="background-image:url({{ panelBodyimgUrl }})"></div>
  95.                 {% endif %}
  96.                 
  97.                 {% if pimcore_checkbox("text-hide-show").isChecked() %}
  98.                 <div class="panel-body">
  99.                     {{ pimcore_textarea("banner-panel-text", { 'attr': { 'class': 'x-form-text-default light-bg text-left', 'height': 90, 'placeholder': 'Please add text here' }, 'nl2br': true }) }}
  100.                 </div>
  101.                 {% endif %}
  102.                 {% if not editmode and  pimcore_input("banner-panel-url").getValue() is not empty %}
  103.                     </a>
  104.                 {% endif %}
  105.             </div>
  106.         </div>
  107.     {% endfor %}
  108. </section>
  109. <div class="container">
  110.     <h1 class="product-carousel-heading">{{ pimcore_input("productcarouselheadline") }}</h1>
  111.     <section class="product-carousel">
  112.         {% for product in products %}
  113.         <div class="product-wrapper">
  114.             <div class="product">
  115.                 <div class="product-wrap same-height">
  116.                   <a href="{{ product.getDetailUrl }}">
  117.                   <div class="img-holder">
  118.                     <div class="img-wrap">
  119.                       {% if product.getFirstImage('productList', country) %}
  120.                       <img class="product-image" src="{{ product.getFirstImage('productList', country) }}">
  121.                       {% endif %}
  122.                     </div>
  123.                   </div>
  124.                   {# {% set brands = product.getBrand() %}
  125.                   {% set brandname ='' %}
  126.                   {% if brands %}
  127.                     {% for brand in brands %}
  128.                       {% set brandname = product.getBrandExtensionNameTrademark() %}
  129.                       {% if brandname is empty %}
  130.                         {% set brandname = product.getBrandExtensionName() %}
  131.                       {% endif %}
  132.                     {% endfor %}
  133.                   {% endif %}
  134.                   <span class="name"><a class="name" href="{{ editmode or preview ? '' : product.getDetailUrl }}">{{ brandname }}</a></span> #}
  135.                   <span class="info">{{ product.getName() }}</span>
  136.                 </div>
  137.                 </a>
  138.                 {# {% if product.getBrandExtensionDiscontinued() %}
  139.                 <span class="text-info red">discontinued</span>
  140.                 {% elseif product.getCreationDate() > lastlogin %}
  141.                 <span class="text-info green">new</span>
  142.                 {% elseif product.getmodificationDate() > lastlogin %}
  143.                 <span class="text-info yellow">updates</span>
  144.                 {% endif %} #}
  145.                 <a href="{{ editmode or preview ? '' : path('shop-add-to-cart',{ item: product.getId()}) }}" class="download-btn"><span>{{ 'shop.buy'|trans }}</span></a>
  146.             </div>
  147.         </div>
  148.         {% endfor %}
  149.     </section>
  150. </div>
  151. {% endblock %}