prepend
string | prepend: string
returns string
Adds a given string to the beginning of a string.
{%- assign origin = request.origin -%}
{{ product.url | prepend: origin }}
{%- assign origin = request.origin -%}
{{ product.url | prepend: origin }}
{
"product": {
"url": "/products/health-potion"
},
"request": {
"origin": "https://polinas-potent-potions.myshopify.com"
}
}
Output
https://polinas-potent-potions.myshopify.com/products/health-potion
Was this page helpful?