I stumbled across this reference at the bottom of the liquid variables reference page for handling filters as a liquid variable.
{{ _filters['view_name.field_name'] | split:"," | sql_quote | join:"," }}
That end portion with the “split” and “join” functions, I decided to try something with a “remove” function that ended up working.
For example, if the “view_name.field_name” in the filter was “Mississippi” and I used the following liquid filter, we would get the following returned.
{{ _filters['view_name.field_name'] | remove:"i"}}
returns: "Msssspp"
Another use case would be stripping the “%” from a “contains” filter to just get the value elsewhere.
Is there any documentation that discusses the different operators/functions like “split”, “join”, “remove” and how to best use them?
Hi Minerkt,
You can find more information and examples about liquid template engine here:
- Split:
- Join:
- Remove:
- Full documentation:
Happy debugging!
Leo