Document variable parameters for include.

The documentation has been updated to demonstrate variable parameters for an include.

    {% include footer.html param="value" variable-param=page.variable %}
This commit is contained in:
David Wales 2015-03-17 14:55:13 +11:00
parent fccc02be6f
commit 778429c6cc
1 changed files with 2 additions and 2 deletions

View File

@ -286,10 +286,10 @@ root of your source directory. This will embed the contents of
</p> </p>
</div> </div>
You can also pass parameters to an include: You can also pass parameters to an include. Note that the variable parameter is NOT surrounded with the usual liquid curly brackets when passed as a parameter.
{% highlight ruby %} {% highlight ruby %}
{% raw %}{% include footer.html param="value" %}{% endraw %} {% raw %}{% include footer.html param="value" variable-param=page.variable %}{% endraw %}
{% endhighlight %} {% endhighlight %}
These parameters are available via Liquid in the include: These parameters are available via Liquid in the include: