Use Cases
Contents
Show block for certain category only
-
Navigate to
Stores > Configuration > Swissup > Easy Catalog Images > Category Page
and disable the following options:Enabled for default categories Enabled for anchor categories
- Navigate to
Products > Categories
- Select some category
-
Switch to
Design
tab and add the followingLayout Update Code
:<referenceContainer name="content"> <block class="Swissup\Easycatalogimg\Block\Widget\SubcategoriesList" name="easycatalogimg"> <action method="setTemplate"> <argument name="template" xsi:type="string">Swissup_Easycatalogimg::list.phtml</argument> </action> <action method="setCategoryCount"> <argument name="category_count" xsi:type="number">4</argument> </action> <action method="setColumnCount"> <argument name="column_count" xsi:type="number">2</argument> </action> <action method="setShowImage"> <argument name="show_image" xsi:type="boolean">true</argument> </action> <action method="setImageWidth"> <argument name="image_width" xsi:type="number">450</argument> </action> <action method="setImageHeight"> <argument name="image_height" xsi:type="number">680</argument> </action> <action method="setHideWhenFilterIsUsed"> <argument name="hide_when_filter_is_used" xsi:type="boolean">true</argument> </action> </block> </referenceContainer>
- Save category and clear the cache.
Remove block from certain category
- Go to
Admin > Stores > Configuration > Swissup > Easy Catalog Images
- Disable the ECI for categories
- Go to
Content > Widgets
and create the ECI widget. - Set the
Categories to show/Categories to hide
option in Widget options. - Set the
Layout Updates
in Storefront Properties to show it where you need.