Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

concat strings shopify liquid

{% comment %}
	You can concat strings in Shopify liquid code by using the 
    append filter. See the example below, then check out the 
    docs (link added as source) :)
{% endcomment %}

{% assign string1 = 'foo' %}
{% assign string2 = ' bar baz!' %}
{{ string1 | append:string2 %}

{% comment %}
	Expected output from the above is:
    
    foo bar baz!
{% endcomment %}
Source by shopify.github.io #
 
PREVIOUS NEXT
Tagged: #concat #strings #shopify #liquid
ADD COMMENT
Topic
Name
2+2 =