I have some data which is a string, I’m passing it into a section with the following method:
{%- liquid
assign myData = 'data],[data],[data'
capture header
section 'header
endcapture
assign header = header | replace: '%%DATA%%', myData
-%}
Then within ‘sections/header.liquid’ I have the following:
{% capture replaced_data %}
%%DATA%%
{% endcapture %}
{%- liquid
assign data = replaced_data | split: '],['
echo data[0]
-%}
Now based off that, you’d expect the first data to be printed out, but infact the following is printed out:
data],[data],[data
For some reason I’m no longer able to do any manipulation with this data once its in the ‘sections/header.liquid’ file. I’ve even tried doing a replace on the ],[ but it just doesn’t take effect.
Anybody experienced similar?