Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Andrei Yazik 24 posts 44 karma points
    May 26, 2011 @ 15:50
    Andrei Yazik
    0

    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>

Please Sign in or register to post replies

Write your reply to:

Draft