Filter a collection passing a variable

procarrera
Excursionist
13 2 2

Hi guys,

I am trying to do this but i don't know what is going wrong with the Liquid logic...

 

how can I passe a variable inside the filter?

 

{% assign mealBox = "Test Here" %}
{% capture mealBoxSlug %}
{{ mealBox | handleize }}
{% endcapture %}
 
{% for product in collections[{{mealBoxSlug}}].products %}

 

 
 
0 Likes