assign
Creates a variable.
The value can be any expression, including filters. Variables live until the end of the file (snippets rendered with render get their own scope).
Syntax
Section titled “Syntax”{% assign name = value %}Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
name (required) |
string | Variable name. |
value (required) |
any | Value or expression. |
Example
Section titled “Example”{% assign greeting = 'Marhaba' | append: ', Noora' %}{{ greeting }}Marhaba, NooraRelated
Section titled “Related”Compatibility
Section titled “Compatibility”Shopify: Same as Shopify.
Since theme platform 1.0.
Was this page helpful?

