From 778429c6ccd09bb72c7f080ac3519cc23ba640f6 Mon Sep 17 00:00:00 2001 From: David Wales Date: Tue, 17 Mar 2015 14:55:13 +1100 Subject: [PATCH] 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 %} --- site/_docs/templates.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/site/_docs/templates.md b/site/_docs/templates.md index 637aeee6..65beede1 100644 --- a/site/_docs/templates.md +++ b/site/_docs/templates.md @@ -286,10 +286,10 @@ root of your source directory. This will embed the contents of

-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 %} -{% raw %}{% include footer.html param="value" %}{% endraw %} +{% raw %}{% include footer.html param="value" variable-param=page.variable %}{% endraw %} {% endhighlight %} These parameters are available via Liquid in the include: