From 4d327f81fd9fbf3538c55b64f4c68ae484e0d826 Mon Sep 17 00:00:00 2001 From: Nicola Fontana Date: Fri, 21 Oct 2016 18:15:27 +0200 Subject: [PATCH] DOCS Specify that the selectors change the scope (#6213) Follow up of issue #4015. --- .../01_Templates/02_Common_Variables.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/en/02_Developer_Guides/01_Templates/02_Common_Variables.md b/docs/en/02_Developer_Guides/01_Templates/02_Common_Variables.md index af2d798f2..9a4e9295d 100644 --- a/docs/en/02_Developer_Guides/01_Templates/02_Common_Variables.md +++ b/docs/en/02_Developer_Guides/01_Templates/02_Common_Variables.md @@ -326,7 +326,7 @@ When in a particular scope, `$Up` takes the scope back to the previous level. <% end_loop %> Given the following structure, it will output the text. - + My Page | +-+ Child 1 @@ -341,6 +341,16 @@ Given the following structure, it will output the text. Page 'Grandchild 1' is a grandchild of 'My Page' Page 'Child 2' is a child of 'MyPage' +
+Additional selectors implicitely change the scope so you need to put additional `$Up` to get what you expect. +
+ + :::ss +

Children of '$Title'

+ <% loop $Children.Sort('Title').First %> + <%-- We have two additional selectors in the loop expression so... --%> +

Page '$Title' is a child of '$Up.Up.Up.Title'

+ <% end_loop %> ### Top