Loop through nodes of multinodepicker (uComponents)
I've created a datatype based on the multi-node tree picker of uComponents.
Maximum node selections is set on -1.
Data is returned as XML.
My field had an alias "home_reistypesSelectie".
I want to loop through these nodes in my xslt macro, but for some reason it won't work.
Loop through nodes of multinodepicker (uComponents)
I've created a datatype based on the multi-node tree picker of uComponents. Maximum node selections is set on -1. Data is returned as XML. My field had an alias "home_reistypesSelectie".
I want to loop through these nodes in my xslt macro, but for some reason it won't work.
My code is:
<xsl:for-each select="$currentPage/home_reistypesSelectie/multinodepicker/nodeid">
<xsl:variable name="node" select="umbraco.library:GetXmlNodeById(.)" />
<xsl:value-of select="$node/@nodeName" />
</xsl:for-each>
The following code:
<xsl:copy-of select="$currentPage/home_reistypesSelectie"/>
returns:
<home_reistypesselectie><multinodepicker><nodeid>1421</nodeid><nodeid>1410</nodeid><nodeid>1437</nodeid></multinodepicker></home_reistypesselectie>
What am I doing wrong?
Hey Kim,
I think your casing is wrong (MultiNodePicker/nodeId), change your code to this:
Rich
Great! Thanks! That solved the problem :)
is working on a reply...