SwissUpLabs Logo


Widget allows you to use subcategory listing block at any page. See how to insert widget to the homepage tutorial for more information.


Widget Interface

You can use widget interface by pressing Insert Widget button at the following pages:

  • Content > Blocks
  • Content > Pages
  • Content > Widgets
  • All other pages, that utilize Insert Widget button functionality

EasyCatalogImages widget


Widget interface does not provide visual preview for all available options. Here you can find the full list of supported options:

Option Value Description
background_color rgb color code Background color what will be used to fill background of resized image, if needed
category_count integer Count of categories to show
category_id integer|null(default) Parent category, do not set to use current category
category_to_hide comma separated ids Categories to hide from output
category_to_show comma separated ids Categories to show
column_count integer Columns count
hide_when_filter_is_used boolean Ability to hide block, if filter is applied or current page > 1
image_width integer Image width, px
image_height integer Image height, px
resize_image boolean Flag, that indicating to use image resizer or not
show_image boolean Show image flag
subacategory_count integer Count of subcategories
template string(Swissup_Easycatalogimg::list.phtml) Template to use
custom_template string Custom Template to use
use_image_attribute boolean Use image attribute, if thumbnail is not available

XML Layout Update

Here is an xml layout skeleton, that could be used from xml files or Xml Layout Update directives:

<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 method="setCategoryCount">
            <argument name="category_count" xsi:type="number">4</argument>
        <action method="setColumnCount">
            <argument name="column_count" xsi:type="number">2</argument>
        <action method="setShowImage">
            <argument name="show_image" xsi:type="boolean">true</argument>
        <action method="setImageWidth">
            <argument name="image_width" xsi:type="number">450</argument>
        <action method="setImageHeight">
            <argument name="image_height" xsi:type="number">680</argument>
        <action method="setHideWhenFilterIsUsed">
            <argument name="hide_when_filter_is_used" xsi:type="boolean">true</argument>

Inline php code

<?php echo $this->getLayout()
    ->toHtml(); ?>

Next up

Edit this Page