Replace commas in a list field with carriage returns using liquid

Knowledge Drop

Last tested: May 26, 2020
 

Say you have a field that shows up like a, b, c but you want it to display in a single row as
a b c

You can use a Liquid for loop with the split function to achieve this!

html: {% assign items = your_dimension_here._value | split: ", " %}

{% for item in items %}

{{ item }}

{% endfor %}

This content is subject to limited support.                

Version history
Last update:
‎06-28-2021 11:47 AM
Updated by: