Creating a Custom Block for GridView, set inside script id=ProductGridItemContainer.
I am extending grid list adding a (conditional) data-template before the div id=“ProductGridItem”.
It works well when refreshing the page in Grid Mode, but not when clicking the "Grid View" - it ignores the condition scoped within "ProductGridItemContainer".
Here is my handlebars loop:
<script id="ProductGridItemContainer" type="text/x-template"> {{#.}} {{#if showGroupName}} <div id="TitleProduct{{id}}" data-template="ProductGridTitleItem" class="grid__col-lg-12 grid__col-md-12 grid__col-sm-12 grid__col-xs-12 dw-mod"> {{#Product}} {{>ProductGridTitleItem}} {{/Product}} </div> {{/if}} <div id="Product{{id}}" data-template="ProductGridItem" data-preloader="overlay" class="grid__col-lg-@columnsCount grid__col-md-@columnsCount grid__col-sm-@columnsCount grid__col-xs-6 product-list__grid-item @imageZoomOnHover dw-mod"> {{#Product}} {{>ProductGridItem}} {{/Product}} </div> {{/.}} </script>
The "ShowGroupName" bool, that seems to be ignored, has been added to the feed in the same scope as the "template" string
template | "ProductItemContainer" |
id | "4" |
showGroupName | true |
Product | […] |
(Also, see video repro of product list)
https://www.loom.com/share/524eff0069484e3ea34f51306f9c59fc
Assuming any template inside "ProductGridItemContainer" would be refreshed when switching views, am I missing some requirement, or handlebars rule?