DOCS Specify that the selectors change the scope (#6213)

Follow up of issue #4015.
This commit is contained in:
Nicola Fontana 2016-10-21 18:15:27 +02:00 committed by Jono Menz
parent 0f8f9f2732
commit 4d327f81fd

View File

@ -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'
<div class="notice" markdown="1">
Additional selectors implicitely change the scope so you need to put additional `$Up` to get what you expect.
</div>
:::ss
<h1>Children of '$Title'</h1>
<% loop $Children.Sort('Title').First %>
<%-- We have two additional selectors in the loop expression so... --%>
<p>Page '$Title' is a child of '$Up.Up.Up.Title'</p>
<% end_loop %>
### Top