templates/product_category/layouts/_sub.html.twig line 1

Open in your IDE?
  1. {% set breadcrumbs = [] %}
  2. {% if childCategoriesObjects is defined and childCategoriesObjects|length == 0 %}
  3.     {% set breadcrumbs = breadcrumbs | merge([{
  4.         "title": "Producten"|trans,
  5.         "anchor" :  "table-anchor"|trans
  6.     }]) %}
  7. {% endif %}
  8. {% if childCategoriesObjects is defined and childCategoriesObjects|length > 0 %}
  9.     {% set breadcrumbs = breadcrumbs | merge([{
  10.         'title':  "Aanbod"|trans,
  11.         'anchor' :  "products-anchor"|trans
  12.     }]) %}
  13. {% endif %}
  14. {% set breadcrumbs = breadcrumbs | merge([{
  15.     'title':  "Toepassingen"|trans,
  16.     'anchor' :  "applications-anchor"|trans
  17. }]) %}
  18. {% set breadcrumbs = breadcrumbs | merge([{
  19.     'title' :  "Werking en accessoires"|trans,
  20.     'anchor' :  "method-and-acccessoires-anchor"|trans
  21. }]) %}
  22. {% set breadcrumbs = breadcrumbs | merge([{
  23.     'title' :  "Gebruik"|trans,
  24.     'anchor' :  "usage-anchor"|trans
  25. }]) %}
  26. {% set breadcrumbs = breadcrumbs | merge([{
  27.     'title' :  "Veelgestelde vragen"|trans,
  28.     'anchor' :  "faq-anchor"|trans
  29. }]) %}
  30. {{ pimcore_area('content-brick-1', {
  31.     'type':'content-brick',
  32.     'params':{
  33.         'content-brick': {
  34.             'containerClasses': 'md:py-20',
  35.             'productCategory': productCategory,
  36.             'forceH1' : true,
  37.             'defaultLayout': 'text-gallery',
  38.             'defaultBackgroundColor':'bg-white',
  39.             'defaultInverted': true,
  40.             'defaultTitle' : productCategory.title ?? page.title,
  41.             'defaultHeadline' : productCategory.subtitle ?? null,
  42.             'defaultWysiwyg' : productCategory.desc ?? page.description,
  43.             'defaultGalleryItems' : productCategory.mediaGalleryItems is defined and (productCategory.mediaGalleryItems|length) > 1 ? (productCategory.mediaGalleryItems | slice(1, 4)) : null,
  44.             'defaultSecondaryLink' : childCategoriesObjects is defined and childCategoriesObjects|length == 0 ? {
  45.                 'title': 'Bekijk de {{ productCategory }}' | trans({ '{{ productCategory }}': (productCategory.name ?? page.title) }),
  46.                 'link': "#table-anchor",
  47.                 'target': "",
  48.             } : false
  49.         }
  50.     }
  51. }) }}
  52. {{ pimcore_area('features', {
  53.     'type':'features-brick',
  54.     'params':{
  55.         'features-brick': {
  56.             'brickBackgroundColor': 'bg-white',
  57.             'productCategory': productCategory
  58.         }
  59.     }
  60. }) }}
  61. {% if childCategoriesObjects is defined and childCategoriesObjects|length == 0 %}
  62.     {# See params above in content-brick-1 -> params -> defaultSecondaryLink -> link = #table-anchor, also breadcrumbs #}
  63.     <div id="table-anchor">
  64.         {{ pimcore_area('product-table-brick-1',{
  65.             'type':'product-table-brick',
  66.             'params': {
  67.                 'product-table-brick': {
  68.                     'defaultTitle': ('{{ productCategory }} huren') | trans({'{{ productCategory }}': (productCategory.name ?: productCategory.key) }),
  69.                     'productCategory': productCategory
  70.                 }
  71.             }
  72.         }) }}
  73.     </div>
  74. {% endif %}
  75. {% if childCategoriesObjects is defined and childCategoriesObjects|length > 0 %}
  76.     <div id="products-anchor">
  77.         {{ pimcore_area('product-category-cards-brick', {
  78.             type: 'product-category-cards-brick',
  79.             params: {
  80.                 'product-category-cards-brick': {
  81.                     showTitle: true,
  82.                     defaultTitle: ('Aanbod {{ productCategory }}') | trans({'{{ productCategory }}': (productCategory.name ?? page.title) }),
  83.                     fourColumns: false,
  84.                     productCategories: childCategoriesObjects
  85.                 }
  86.             }
  87.         }) }}
  88.         {{ pimcore_area('text-and-links-brick-1', {
  89.             'type':'text-and-links-brick',
  90.             'params':{
  91.                 'text-and-links-brick': {
  92.                     style: 'normal',
  93.                 }
  94.             }
  95.         }) }}
  96.     </div>
  97. {% endif %}
  98. <div id="applications-anchor">
  99.     {{ pimcore_area('unique-selling-point-brick-1', {
  100.         'type':'unique-selling-point-brick',
  101.         'params': {
  102.             'unique-selling-point-brick': {
  103.                 'brickBackgroundColor' : 'bg-blue-300',
  104.                 'defaultTitle': ('Toepassingen {{ productCategory }}') | trans({'{{ productCategory }}': (productCategory.name ?: productCategory.key) }),
  105.             }
  106.         }
  107.     }) }}
  108. </div>
  109. <div id="method-and-acccessoires-anchor">
  110.     {{ pimcore_area('content-brick-2', {
  111.         'type':'content-brick',
  112.         'params': {
  113.             'content-brick': {
  114.                 'layout': 'text-usps',
  115.                 'uspsActive' : true,
  116.                 'brickBackgroundColor': 'bg-gray-200',
  117.                 'defaultTitle': ('Werking en accessoires {{ productCategory }}') | trans({'{{ productCategory }}': (productCategory.name ?: productCategory.key) }),
  118.             }
  119.         }
  120.     }) }}
  121. </div>
  122. {{ pimcore_area("testimonial-brick-1", {
  123.     'type' : "testimonial-brick" })
  124. }}
  125. {{ pimcore_area('product-category-cards-brick-1', {
  126.     'type':'product-category-cards-brick',
  127.     'params':{
  128.         'product-category-cards-brick': {
  129.             'defaultTitle': ('Alternatieven voor {{ productCategory }}') | trans({'{{ productCategory }}': (productCategory.name ?: productCategory.key) }),
  130.             'brickBackgroundColor' : 'bg-blue-200',
  131.             'defaultBackgroundColor' : 'bg-blue-200',
  132.         }
  133.     }
  134. }) }}
  135. {{ pimcore_area('content-brick-3', {
  136.     'type':'content-brick',
  137.     'params':{
  138.         'content-brick': {
  139.             'layout': 'text-image',
  140.         }
  141.     }
  142. }) }}
  143. <div id="usage-anchor">
  144.     {{ pimcore_area('content-brick-4', {
  145.         'type':'content-brick',
  146.         'params':{
  147.             'content-brick': {
  148.                 'layout': 'text-image',
  149.                 'whiteSpaceBottom': false,
  150.                 'defaultInverted': true,
  151.             }
  152.         }
  153.     }) }}
  154. </div>
  155. <div id="faq-anchor">
  156.     {{ pimcore_inc(document.getProperty('faqSnippet')) }}
  157. </div>