Get length of selected items in templated filter when some items have commas

z_k
Bronze 2
Bronze 2
  1. I want to base some of my `html` parameter logic on selected values in a filter.
  2. My original thought was using the following
 {% if _filters[‘field_name.view_name']  | split: "," | size > 1 %} 
‘Do something’
{% else %}
‘Do another thing’
{% endif %}
  1.  However, some of my items in the filter have commas, resulting in 1 extra array item (and count) for each item with a comma.

Any folks have any thoughts?

1 0 151
0 REPLIES 0
Top Labels in this Space
Top Solution Authors