mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-15 08:50:45 -07:00
Add 'append' documentation
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
---
|
||||
title: append
|
||||
---
|
||||
|
||||
`append` concatenates two strings and returns the concatenated value.
|
||||
|
||||
{% highlight liquid %}
|
||||
{% raw %}
|
||||
{{ "/my/fancy/url" | append:".html" }}
|
||||
{% endraw %}
|
||||
# => "/my/fancy/url.html"
|
||||
{% endhighlight %}
|
||||
|
||||
It can also be used with variables:
|
||||
|
||||
{% highlight liquid %}
|
||||
{% raw %}
|
||||
{% assign filename = "/index.html" %}
|
||||
{{ product.url | append:filename }}
|
||||
{% endraw %}
|
||||
# => "#{product.url}/index.html"
|
||||
{% endhighlight %}
|
||||
Reference in New Issue
Block a user