Skip to content

Commit b876771

Browse files
greystatenul800sebastiaan
authored andcommitted
Minor edits to the XPath query help sheet (#11385)
* Clarify the use of placeholders Since the placeholder is only replaced if it's at the beginning of the query, I've added a note about it. Also made the spelling of XPath consistent and fixed a nesting error in the HTML. * Rephrase a couple of sentences (cherry picked from commit e04efe6)
1 parent 9a6a7ff commit b876771

File tree

1 file changed

+18
-13
lines changed

1 file changed

+18
-13
lines changed

src/Umbraco.Web.UI.Client/src/views/prevalueeditors/treesource.html

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
</button>
2828
<div class="mt2" ng-show="model.value.type == 'content'">
2929
<umb-icon icon="icon-search" class="icon"></umb-icon>
30-
<button type="button" class="btn-link" ng-click="showSearch = true">Query for root node with xpath</button>
30+
<button type="button" class="btn-link" ng-click="showSearch = true">Query for root node with XPath</button>
3131
</div>
3232
</div>
3333

@@ -36,32 +36,37 @@
3636
<input type="text"
3737
ng-model="model.value.query"
3838
class="umb-property-editor umb-textstring"
39-
placeholder="Enter xpath query">
39+
placeholder="Enter XPath query">
4040

4141
<ul class="unstyled list-icons mt3">
4242
<li style="max-width: 600px">
4343
<umb-icon icon="icon-help-alt" class="icon"></umb-icon>
44-
<button type="button" class="btn-link" ng-click="showHelp = !showHelp">{{showHelp ? 'Hide' : 'Show'}} xpath query help</button>
44+
<button type="button" class="btn-link" ng-click="showHelp = !showHelp">{{showHelp ? 'Hide' : 'Show'}} XPath query help</button>
4545

4646
<div class="small" ng-show="showHelp">
4747
<p>
48-
Use Xpath query to set a root node on the tree, either based on a search from the root of the content tree, or by using a context-aware placeholder.
48+
Use an XPath query to set a root node on the tree, either based on a search from the root of the content tree, or by using a context-aware placeholder.
4949
</p>
5050

5151
<p>
52-
Placeholders finds the nearest published ID and runs its query from there, so for instance:
53-
54-
<pre>$parent/newsArticle</pre>
55-
56-
Will try to get the parent if available, but will then fall back to the nearest ancestor and query for all news articles there.
52+
A placeholder finds the nearest published ID and runs its query from there, so for instance:
53+
</p>
54+
55+
<pre>$parent/newsArticle</pre>
56+
57+
<p>
58+
Will try to get the parent if available, but will then fall back to the nearest ancestor and query for all news article children there.
5759
</p>
5860

5961
<p>
6062
Available placeholders: <br/>
61-
<code>$current</code>: current page or closest found ancestor<br/>
62-
<code>$parent</code>: parent page or closest found ancestor<br/>
63-
<code>$root</code>: root of the content tree<br/>
64-
<code>$site</code>: Ancestor node at level 1 <br/>
63+
<code>$current</code>: Current page or closest found ancestor<br/>
64+
<code>$parent</code>: Parent page or closest found ancestor<br/>
65+
<code>$root</code>: Root of the content tree<br/>
66+
<code>$site</code>: Ancestor node at level 1<br/>
67+
</p>
68+
<p>
69+
Note: The placeholder can only be used at the beginning of the query.
6570
</p>
6671
</div>
6772
</li>

0 commit comments

Comments
 (0)