From fe19f13ca532023b9a588fe5c35e6f8b492407da Mon Sep 17 00:00:00 2001 From: messju Date: Fri, 9 Dec 2005 15:30:13 +0000 Subject: [PATCH] added explanation of variables' scope within {include} --- .../language-function-include.xml | 30 +++++++++++-------- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/docs/en/designers/language-builtin-functions/language-function-include.xml b/docs/en/designers/language-builtin-functions/language-function-include.xml index 08066054..6b8466d8 100644 --- a/docs/en/designers/language-builtin-functions/language-function-include.xml +++ b/docs/en/designers/language-builtin-functions/language-function-include.xml @@ -2,19 +2,25 @@ {include} - - {include} tags are used for including other templates in the current - template. Any variables available in the current template are also - available within the included template. The {include} tag must have - the attribute "file", which contains the template resource path. - - - You can optionally pass the 'assign' attribute, - which will specify a template variable name that the output of - {include} will be assigned to instead of - displayed. + + {include} tags are used for including other templates in the current + template. Any variables available in the current template are also + available within the included template. The {include} tag must have + the attribute "file", which contains the template resource path. + + + You can optionally pass the 'assign' attribute, + which will specify a template variable name that the output of + {include} will be assigned to instead of + displayed. + + + All assigned variables' values are restored after the scope of the + included template is left. This means you can use all variables from + the including template inside the included template. But changes to + variables inside the included template are not visible inside the + including template after the {include} statement. -