templates/areas/apk-products-related/view.html.twig line 1

Open in your IDE?
  1. {% if editmode %}
  2. <div class="uk-container apk-container-1400">
  3.     <div uk-alert>
  4.         <h1 class="uk-h1">APK product related</h1>
  5.     </div>
  6.     <ul uk-tab>
  7.         <li><a href="#">Configurations</a></li>
  8.         <li class="uk-active"><a href="#">Content Edit</a></li>
  9.     </ul>
  10.     <ul class="uk-switcher uk-margin">
  11.         <li class="apk-size-20 uk-grid-small" uk-grid>
  12.             {# Colonne 1 #}
  13.             <div class="uk-width-1-2@m" uk-margin>
  14.                 <div>Type de heading pour le titre ?</div>
  15.                 {{ pimcore_select("content-heading", {
  16.                     "store" : [
  17.                         ['span', 'span'],
  18.                         ['h1', 'Heading 1'],
  19.                         ['h2', 'Heading 2'],
  20.                         ['h3', 'Heading 3'],
  21.                         ['h4', 'Heading 4'],
  22.                         ['h5', 'Heading 5'],
  23.                         ['h6', 'Heading 6']
  24.                     ],
  25.                     "defaultValue" : "h2"
  26.                 }) }}
  27.                 <div><strong>Style</strong> du heading pour le titre ?</div>
  28.                 {{ pimcore_select("content-heading-style", {
  29.                     "store" : [
  30.                         ['h1', 'Heading 1'],
  31.                         ['h2', 'Heading 2'],
  32.                         ['h3', 'Heading 3'],
  33.                         ['h4', 'Heading 4'],
  34.                         ['h5', 'Heading 5'],
  35.                         ['h6', 'Heading 6']
  36.                     ],
  37.                     "defaultValue" : "h2"
  38.                 }) }}
  39.             </div>
  40.             {# Colonne 2 #}
  41.             <div class="uk-width-1-2@m" uk-margin>
  42.                 <div>Espacement en haut du block</div>
  43.                 {{ pimcore_select("margin-top", {
  44.                     "store" : [
  45.                         ['', 'Aucun'],
  46.                         ['uk-margin-small-top', 'Petit'],
  47.                         ['uk-margin-medium-top', 'Moyen'],
  48.                         ['uk-margin-large-top', 'Grand'],
  49.                         ['uk-margin-xlarge-top', 'Très grand'],
  50.                     ],
  51.                     "defaultValue" : ""
  52.                 }) }}
  53.     
  54.                 <div>Espacement en bas du block</div>
  55.                 {{ pimcore_select("margin-bottom", {
  56.                     "store" : [
  57.                         ['', 'Aucun'],
  58.                         ['uk-margin-small-top', 'Petit'],
  59.                         ['uk-margin-medium-top', 'Moyen'],
  60.                         ['uk-margin-large-top', 'Grand'],
  61.                         ['uk-margin-xlarge-top', 'Très grand'],
  62.                     ],
  63.                     "defaultValue" : ""
  64.                 }) }}
  65.                 <div>Afficher un scroll ?</div>
  66.                 {{ pimcore_select("scroll", {
  67.                     "store" : [
  68.                         ['', 'Aucun'],
  69.                         ['apk-scroll', 'SCROLL'],
  70.                         ['apk-top', 'TOP']
  71.                     ],
  72.                     "defaultValue" : "apk-top"
  73.                 }) }}
  74.                 
  75.             </div>
  76.         </li>
  77.     
  78.         <li class="uk-active">
  79.             <div class="uk-margin-large-bottom">
  80.                 <div class="uk-margin"><strong>Titre de la section</strong></div>
  81.                 <h2 class="uk-h2">
  82.                     {{ pimcore_textarea("content-title",{
  83.                         "nl2br" : true
  84.                     }) }}
  85.                 </h2>
  86.                 <div class="uk-margin"><strong>Texte supplémentaire en dessous du titre</strong></div>
  87.                 {{ pimcore_textarea("content-subtitle") }}
  88.                 <div class="uk-margin"><strong>Repeater de produits</strong></div>
  89.                 {% for row in pimcore_block('productBlock').iterator %}
  90.                     <div uk-alert>
  91.                         <div><strong>Univers</strong>du produit</div>
  92.                         {{ pimcore_select("product-universe", {
  93.                             "store" : [
  94.                                 ['apk-universe-magnecaps', 'Magnecaps'],
  95.                                 ['apk-universe-muscles', 'Magnecaps Muscles'],
  96.                                 ['apk-universe-relax', 'Magnecaps Relax'],
  97.                                 ['apk-universe-memory-concentration', 'Magnecaps Mem. & Concen.']
  98.                             ],
  99.                             "defaultValue" : "apk-universe-magnecaps"
  100.                         }) }}
  101.                         <div class="uk-margin"><strong>Titre du produit</strong></div>
  102.                         {{ pimcore_textarea("product-title") }}
  103.                         
  104.                         <div class="uk-margin"><strong>Image du produit</strong></div>
  105.                         {{ pimcore_image("product-image", {'width' : 300, 'height' : 200}) }}
  106.     
  107.                         <div class="uk-margin"><strong>Lien</strong></div>
  108.                         <div class="actions">
  109.                             {{ pimcore_link("content-btn", {
  110.                                 "class" : "uk-button"
  111.                             }) }}
  112.                             <hr>
  113.                             <dt>Google Analytics Event: Action</dt>
  114.                             <dd>{{ pimcore_input("content-btn-secondary-ga-1-1") }}</dd>
  115.                             <hr>
  116.                             <dt>Google Analytics Event: Category</dt>
  117.                             <dd>{{ pimcore_input("content-btn-secondary-ga-1-2") }}</dd>
  118.                             <hr>
  119.                             <dt>Google Analytics Event: Label</dt>
  120.                             <dd>{{ pimcore_input("content-btn-secondary-ga-1-3") }}</dd>
  121.                         </div>    
  122.                     </div>
  123.                     
  124.                 {% endfor %}
  125.                 
  126.             </div>
  127.         </li>
  128.     </ul>
  129. </div>
  130. {% endif %}
  131. {% if not editmode %}
  132. <div class="apk-areabrick-container uk-flex uk-flex-middle {{ pimcore_select("margin-top") }} {{ pimcore_select("margin-bottom") }}">
  133.     <div class="uk-container apk-container-1200">
  134.                 
  135.         <div class="uk-text-center">
  136.             
  137.             {% if not pimcore_textarea("content-title").isEmpty %}
  138.                 {% if pimcore_select("content-heading").data == "span" %}
  139.                     <span class="apk-title uk-{{ pimcore_select("content-heading-style").getData() }}">
  140.                         {{ pimcore_textarea("content-title", {
  141.                             "nl2br" : true,
  142.                             "htmlspecialchars" : false,
  143.                         })|raw }}
  144.                     </span>
  145.                 {% else %}
  146.                     {% set content_heading = pimcore_select("content-heading").getData() %}
  147.                     <{{ content_heading }} class="apk-title uk-{{ pimcore_select("content-heading-style").getData() }}">
  148.                         {{ pimcore_textarea("content-title", {
  149.                             "nl2br" : true,
  150.                             "htmlspecialchars" : false,
  151.                         })|raw }}
  152.                     </{{ content_heading }}>
  153.                 {% endif %}
  154.             {% endif %}
  155.                             
  156.             <span class="apk-subtitle">{{ pimcore_textarea("content-subtitle") }}</span>
  157.             
  158.         </div>
  159.         <div class="uk-margin-large-top uk-grid-large uk-child-width-expand@m" uk-grid uk-height-match="target: .apk-product-title">
  160.             {% for row in pimcore_block('productBlock').iterator %}
  161.             <div>
  162.                 <div class="apk-product-container hexagone uk-flex uk-flex-middle uk-flex-center">
  163.                     <div>
  164.                         <div class="apk-product-title uk-flex uk-flex-middle uk-flex-center">
  165.                             {{ pimcore_textarea("product-title", {'nl2br' : true}) }}
  166.                         </div>
  167.     
  168.                         <div class="apk-product-image">
  169.                             {% if pimcore_image("product-image").src %}
  170.                                 {{ pimcore_image("product-image").thumbnail('big-product-thumb').html()|raw }}    
  171.                             {% endif %}
  172.                         </div>
  173.     
  174.                         {% if not pimcore_link("content-btn").isEmpty() %}
  175.                         <div class="apk-product-action">
  176.                             {% if
  177.                                 not pimcore_input("content-btn-secondary-ga-1-1").isEmpty
  178.                                 and not pimcore_input("content-btn-secondary-ga-1-2").isEmpty 
  179.                                 and not pimcore_input("content-btn-secondary-ga-1-3").isEmpty 
  180.                             %}
  181.         
  182.                                 {{ pimcore_link("content-btn", {
  183.                                     "class" : "uk-button " ~ pimcore_select("product-universe").data,
  184.                                     "onclick" : "javascript:sendGtagEvent('" ~ add_slashes(pimcore_input("content-btn-secondary-ga-1-1")) ~ "',
  185.                                         '" ~ add_slashes(pimcore_input("content-btn-secondary-ga-1-2")) ~ "',
  186.                                         '" ~ add_slashes(pimcore_input("content-btn-secondary-ga-1-3")) ~ "');"
  187.                                 }) }}
  188.         
  189.                             {% else %}
  190.                             
  191.                                 {{ pimcore_link("content-btn", {
  192.                                     "class" : "uk-button " ~ pimcore_select("product-universe").data
  193.                                 }) }}
  194.                             
  195.                             {% endif %}
  196.                         </div>
  197.                         {% endif %}
  198.                     </div>
  199.                 </div>
  200.             </div>
  201.             {% endfor %}
  202.         </div>     
  203.     </div>
  204.     {# Scroll géré dans le main.js #}
  205.     {% if pimcore_select("scroll").data == "apk-scroll" or pimcore_select("scroll").data == "apk-top" %}
  206.     <div class="apk-scroll-container">
  207.         <div class="uk-container apk-container-1400">
  208.             <div class="uk-position-relative">
  209.             {% if pimcore_select("scroll").data == "apk-scroll" %}
  210.                 <div class="apk-scroll">
  211.                     {{ "SCROLL"|trans }}
  212.                 </div>
  213.             {% elseif pimcore_select("scroll").data == "apk-top" %}
  214.                 <div class="apk-scroll apk-top">
  215.                     {{ "TOP"|trans }}
  216.                 </div>
  217.             {% endif %}
  218.             </div>
  219.         </div>
  220.     </div>
  221.     {% endif %}
  222. </div>
  223. {% endif %}