Reputation: 4131
I am new to xpath. I am trying to use the "nuPickers XML Dropdown picker" on Umbraco 7.3.4
but no matter what xpath xpression filter i use, the dropdown remains empty no nodes is being loaded in to the dropdown
i tried the following filters:
$root/
$site/
/*/
$ancestor-or-self::Home/
but to no avail, none of them loads any nodes
i actually want to select all the "Club" nodes under "Clubcontainer", but i cant get it to load any nodes, nevermind the specific ones that i actually want. My Umbraco.config looks as follows: (some nodes removed under to only show relevant nodes for my filter query.)
<root id="-1">
<Home id="2081" key="ebb9222f-f26c-4462-9f5d-43dba520326f" parentID="-1" level="1" creatorID="0" sortOrder="0" createDate="2015-12-29T12:19:53" updateDate="2016-01-09T17:27:57" nodeName="Home" urlName="home" path="-1,2081" isDoc="" nodeType="1070" creatorName="Gerrie Pretorius" writerName="Gerrie Pretorius" writerID="0" template="1049" nodeTypeAlias="Home">
<Clubcontainer id="2094" key="6f11e986-3e29-4555-8bc4-5a847600704c" parentID="2081" level="2" creatorID="0" sortOrder="3" createDate="2015-12-29T13:20:15" updateDate="2016-01-09T17:27:57" nodeName="Chess Clubs" urlName="chess-clubs" path="-1,2081,2094" isDoc="" nodeType="2092" creatorName="Gerrie Pretorius" writerName="Gerrie Pretorius" writerID="0" template="0" nodeTypeAlias="Clubcontainer">
<Club id="2103" key="856c9937-cf4c-481b-aaba-487e0dcee199" parentID="2094" level="3" creatorID="0" sortOrder="0" createDate="2016-01-07T22:41:28" updateDate="2016-01-09T17:27:57" nodeName="Hlalefang Alexandra Chess club" urlName="hlalefang-alexandra-chess-club" path="-1,2081,2094,2103" isDoc="" nodeType="2093" creatorName="Gerrie Pretorius" writerName="Gerrie Pretorius" writerID="0" template="0" nodeTypeAlias="Club">
<president><![CDATA[Mr President]]></president>
<presidentCell><![CDATA[0123 13131313]]></presidentCell>
<presidentEmail><![CDATA[[email protected]]]></presidentEmail>
</Club>
<Club id="2104" key="a5d73286-9572-445b-9d3a-7f758de64d0e" parentID="2094" level="3" creatorID="0" sortOrder="1" createDate="2016-01-07T22:42:27" updateDate="2016-01-09T17:27:57" nodeName="Chess Excellence" urlName="chess-excellence" path="-1,2081,2094,2104" isDoc="" nodeType="2093" creatorName="Gerrie Pretorius" writerName="Gerrie Pretorius" writerID="0" template="0" nodeTypeAlias="Club">
<president><![CDATA[Jane Doe]]></president>
<presidentCell><![CDATA[012 345 6789]]></presidentCell>
<webAddress><![CDATA[http://www.example.net]]></webAddress>
<presidentEmail><![CDATA[[email protected]]]></presidentEmail>
</Club>
</Clubcontainer>
</Home>
</root>
If some-one can help me witht his i would greatly appreciate it.
Upvotes: 0
Views: 2071
Reputation: 4131
Found the answer provided to me by Marc Goodson here
To load all Nodes of documentType Club use //Club
or to load the specific club nodes:
$ancestorOrSelf/ancestor-or-self::Home[position()=1]//Clubcontainer//Club
Upvotes: 1