templates/frontend-eforum/index-product.html.twig line 1

Open in your IDE?
  1. {% embed '/frontend-eforum/_partials/header.html.twig' %}
  2.     {%- block metaTitle -%}
  3.         {%- if
  4.             product is defined
  5.             and product is not empty
  6.             and product.metaTags is not empty
  7.         -%}
  8.             {{- product.metaTags.title -}}
  9.         {%- endif -%}
  10.     {%- endblock -%}
  11.     {%- block metaDescription -%}
  12.         {%-  if
  13.             product is defined
  14.             and product is not empty
  15.             and product.metaTags is not empty
  16.         -%}
  17.             <meta name="description" content="{{- product.metaTags.description -}}">
  18.         {%- endif -%}
  19.     {%- endblock -%}
  20.     {%- block seoHeadScripts -%}
  21.         {%-  if
  22.             product is defined
  23.             and product is not empty
  24.             and product.metaTags is not empty
  25.         -%}
  26.             {{- product.metaTags.headScripts -}}
  27.         {%- endif -%}
  28.     {%- endblock -%}
  29.     {%- block seoBodyScripts -%}
  30.         {%-  if
  31.             product is defined
  32.             and product is not empty
  33.             and product.metaTags is not empty
  34.         -%}
  35.             {{- product.metaTags.bodyScripts -}}
  36.         {%- endif -%}
  37.     {%- endblock -%}
  38. {% endembed %}
  39. {% set injectBreadcrumbs = false %}
  40. {% if modules.withoutSidebar.top is not empty %}
  41.     {% set firstTopModule = (modules.withoutSidebar.top|keys)[0]|split("_")[0] %}
  42.     {% if firstTopModule == 'productBanner' or firstTopModule == 'faqTop' %}
  43.         {% set injectBreadcrumbs = firstTopModule %}
  44.     {% endif %}
  45. {% endif %}
  46. {% if injectBreadcrumbs == false %}
  47.     {% include "frontend-eforum/_partials/breadcrumbs.html.twig" %}
  48. {% endif %}
  49. {% if product.useHtmlLanding == false %}
  50.     {% include "frontend-eforum/content.html.twig" with {
  51.         modules: modules.withoutSidebar.top,
  52.         injectBreadcrumbs: injectBreadcrumbs,
  53.         productsInCategory : modules.productsInCategory
  54.     } %}
  55.     <div class="site-wrapper__bg" style="background-image:url(/build/images/jumbotron-front_page.jpg)"></div>
  56.     <section class="product-overview" id="product-overview">
  57.         {% if modules.sideBarList is not empty %}
  58.             {% include "frontend-eforum/_partials/nav.html.twig" with {
  59.                 list: modules.sideBarList
  60.             } %}
  61.         {% endif %}
  62.         {% include "frontend-eforum/content.html.twig" with {
  63.             modules: modules.withSidebar,
  64.             productsInCategory : modules.productsInCategory
  65.         } %}
  66.     </section>
  67.     {% include "frontend-eforum/content.html.twig" with {
  68.         modules: modules.withoutSidebar.bottom,
  69.         position: "bottom",
  70.         productsInCategory : modules.productsInCategory
  71.     } %}
  72. {% else %}
  73.     {% include "frontend-eforum/_partials/modules/customLanding.html.twig" %}
  74. {% endif %}
  75. {% embed "frontend-eforum/footer.html.twig" with {footerModules: modules.footerInjected} %}
  76.     {% block javascripts %}
  77.         {% if product.customScripts is not empty %}
  78.             <script type="text/javascript">
  79.                 {{ product.customScripts|raw }}
  80.             </script>
  81.         {% endif %}
  82.         {% if(dataLayer is defined and dataLayer) %}
  83.             <script>
  84.                 window.dataLayer = window.dataLayer || [];
  85.                 window.dataLayer.push({
  86.                     'ecomm_prodid' : '{{ dataLayer.ecomm_prodid }}',
  87.                     'ecomm_pagetype' : '{{ dataLayer.ecomm_pagetype }}',
  88.                     'ecomm_totalvalue' :'{{ dataLayer.ecomm_totalvalue }}',
  89.                     'ecomm_category': '{{ dataLayer.ecomm_category }}'
  90.                 });
  91.             </script>
  92.         {% endif %}
  93.     {% endblock %}
  94. {% endembed %}