Hey! I’m trying to do multiple variable assigns in one bracket set, as follows. Any idea why it’s not working?
{%
assign productswidth = '100%',
pageswidth = '60%',
loop = false,
playbutton = "URL"
%}
A user encountered issues trying to assign multiple variables within a single {% %} template tag block. The initial attempt to chain multiple assign statements in one bracket set was not working.
Solution Found:
The user resolved the problem by switching to the {% liquid %} tag, which allows multiple commands to be executed sequentially within a single block:
assign statements without closing and reopening tagsThe working solution uses {% liquid %} followed by multiple assign commands for variables like productswidth, pageswidth, loop, and buttonURL.
Hey! I’m trying to do multiple variable assigns in one bracket set, as follows. Any idea why it’s not working?
{%
assign productswidth = '100%',
pageswidth = '60%',
loop = false,
playbutton = "URL"
%}
I found a solution:
{% liquid
assign productswidth = '100%'
assign pageswidth = '60%'
assign loop = false
assign playbutton = "URL"
%}