From 556950de47b007874dfe5bc37b0dfeb519a34eff Mon Sep 17 00:00:00 2001 From: Hamish Friedlander Date: Wed, 11 Apr 2012 21:57:28 +1200 Subject: [PATCH] MINOR: Add some basic docs on new include feature --- docs/en/reference/templates.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/en/reference/templates.md b/docs/en/reference/templates.md index 189223203..d68a668f6 100644 --- a/docs/en/reference/templates.md +++ b/docs/en/reference/templates.md @@ -121,6 +121,14 @@ a variable is true <% include MembersOnlyInclude %> <% end_if %> +Includes can't directly access the parent scope of the scope active when the include is included. However you can +pass arguments to the include, which are available on the scope top within the include + + :::ss + <% with CurrentMember %> + <% include MemberDetails PageTitle=$Top.Title, PageID=$Top.ID %> + <% end_with %> + You can also perform includes using the Requirements Class via the template controls. See the section on [Includes in Templates](requirements#including_inside_template_files) for more details and examples.