shithub: hugo

Download patch

ref: bc48b4606ab436a17f663249482c41704d8b57c0
parent: 8f8120ba14adb1c6e3e3cd69309cc661b6e85f23
author: Alexandre Bourget <[email protected]>
date: Fri Jan 1 11:08:39 EST 2016

Added documentation about variable scoping in "partials".

--- a/docs/content/templates/partials.md
+++ b/docs/content/templates/partials.md
@@ -106,5 +106,21 @@
 
 Note that the subdirectories you create under /layout/partials can be named whatever you like.
 
-**For more examples of referencing these templates, see [single content
-templates](/templates/content/), [list templates](/templates/list/) and [homepage templates](/templates/homepage/).**
+For more examples of referencing these templates, see
+[single content templates](/templates/content/),
+[list templates](/templates/list/) and
+[homepage templates](/templates/homepage/).
+
+
+Variable scoping
+----------------
+
+As you might have noticed, `partial` calls receive two paramters.
+
+1. The first is the name of the partial and determines the file
+location to be read.
+2. The second is the variables to be passed down to the partial.
+
+This means the partial _only_ be able to access those variables. It is
+isolated and has no access to the outer scope. From within the
+partial, `$.Var` is equivalent to `.Var`