CATEGORIES

Filtering WebApps and Modules by Categories

7min
this article shows how to filter webapp and module items using their category ids parameter introduction in this set of articles, we'll show you the liquid syntax needed to get the most out of categories on the front end you can use category ids to filter webapp, module or ecommerce product items when including a list view in the page filtering by a single category or multiple categories you can filter by a single category using category ids {% include 'module' id '3' layout 'default' per page '20' sort type 'properties name' sort order 'asc' category ids '1' %} you can filter by multiple categories using comma separated values in the category ids parameter {% include 'module' id '3' layout 'default' per page '20' sort type 'properties name' sort order 'asc' category ids '1,2,3' %} webapps and modules this parameter works whether you're filtering webapps or modules! webapp {% include 'webapp' id '3' layout 'default' per page '20' sort type 'properties name' sort order 'asc' category ids '1,2' %} module {% include 'mdoule' id '3' layout 'default' per page '20' sort type 'properties name' sort order 'asc' category ids '1,2' %} ecommerce products {% include 'ecommerce/products' layout "my layout" category ids '1,2' type 'list' %} nested categories if you filter by a category which contains sub categories, the results will include all items belonging to the sub categories e g if you have a products category containing merchandise and music, filtering by the id of the products category will return all items belonging to products, merchandise and music