Defining dropzones for ShopBuilder contents

We added the possibility to compartmentalise ShopBuilder contents into smaller sections that can be edited individually, which we labeled "dropzones". For this purpose, we added the new parameter "$dropzone" to the function shop_builder_category_template($categoryId, $contentType, $dropzone).
The function serves to load ShopBuilder contents for specified categories. The $dropzone parameter is the parameter via which theme developers can label individual sections of the page. Take a look at the example below:

Example for defining dropzones

<div class="top">
    {{ shop_builder_category_template(42, "content", "top") }}

<div class="main">
    {{ shop_builder_category_template(42, "content", "main") }}

<div class="footer">
    {{ shop_builder_category_template(42, "content", "bottom") }}

Regardless of the number of dropzones the ShopBuilder content is divided into, the end user of the ShopBuilder is still only editing a single content, which here is split into three separate sections. The developer of the theme can choose freely, in which parts of the template they display these sections.

Static contents were hitherto output with the help of layout containers. We added the new Twig function shop_builder_template($containerName, $contentType, $dropzone). This function functions analogously to the one detailed above. Instead of a category ID, however, the function takes on a layout container as parameter, for instance "Ceres::Header" or "Ceres::Footer".

Is this article helpful?


Thank you for your Feedback

you can close this field now!