Loop with filter categories


#1

Hello
I would like filtered category from a loop .
My code return nothing when I write this code.
I don’t find any kind of filter to find the right product.categories

My page :slight_smile:`

layout: default


{{ page.categories | capitalize }}

    {% assign products = site.products[page.categories] %} {% for product in products %}
  • {{ product.name }} {% for cat_name in product.categories %} {{ cat_name }} {% endfor %}
  • {% else %}

    Error -- Product empty

    {% endfor %}
`