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