I'm trying to get nodes from ultimate picker using XSLT, but I receive no results, while there are 3 nodes in the picker. Could anyone please suggest how to do it?
Below is the code that I use. In my case, the "nodes" collection is always empty. Maybe, anything is wrong with the code?
Getting node from Ultimate Picker
Hello everyone,
I'm trying to get nodes from ultimate picker using XSLT, but I receive no results, while there are 3 nodes in the picker. Could anyone please suggest how to do it?
Below is the code that I use. In my case, the "nodes" collection is always empty. Maybe, anything is wrong with the code?
<xsl:template match="/">
<!-- The fun starts here -->
<xsl:variable name="preNodes">
<xsl:variable name="relatedContent" select="$currentPage/data[@alias='references']" />
<xsl:variable name="nodeIds" select="umbraco.library:Split($relatedContent, ',')" />
<xsl:for-each select="$nodeIds/value">
<xsl:copy-of select="umbraco.library:GetXmlNodeById(.)"/>
</xsl:for-each>
</xsl:variable>
<div><xsl:value-of select="count(msxml:node-set($preNodes)/node)" /></div>
<xsl:variable name="nodes" select="msxml:node-set($preNodes)/node" />
<xsl:if test="count($nodes) > 0">
<xsl:for-each select="$nodes" >
<table>
<tbody>
<tr class="title">
<td class="textColumn">
<xsl:value-of select="@nodeName" />
</td>
</tr>
<tr>
</tbody>
</table>
</xsl:for-each>
</xsl:if>
</xsl:template>
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.