MINOR: Add some basic docs on new include feature

This commit is contained in:
Hamish Friedlander 2012-04-11 21:57:28 +12:00
parent 21bf409b7b
commit 556950de47

View File

@ -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.