Copied to clipboard

Flag this post as spam?

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


  • Horst Sterr 171 posts 133 karma points
    Aug 04, 2009 @ 22:23
    Horst Sterr
    0

    Howto? umbraco.library:GetRelatedNodesAsXml()

    Hi,
    copied some nodes with the "Relate copied items to original" checkbox ticked but do not get any result with the following approach.

    <xsl:for-each select="umbraco.library:GetRelatedNodesAsXml($currentPage/@id)">
       <a href="{umbraco.library:NiceUrl(@id)}"><xsl:value-of select="@nodeName"/></a>
    </xsl:for-each>

    any ideas what i am doing wrong?
    Thanks for any help.

    /Horst

  • Petr Snobelt 923 posts 1534 karma points
    Aug 05, 2009 @ 08:27
    Petr Snobelt
    1

    Try verify data,

    <textarea>
    <xsl:copy-of select="umbraco.library:GetRelatedNodesAsXml($currentPage/@id)" />
    </textarea>

    and if you still have problem post result here.

  • Thomas Höhler 1237 posts 1709 karma points MVP
    Aug 05, 2009 @ 09:53
    Thomas Höhler
    101

    Via GetRelatedNodesAsXml you get an xml structure like this:

    <relations>
    <relation typeId="1" typeName="Relate Document On Copy" createDate="05.08.2009 09:46:59" parentId="1050" childId="1053">
    <comment></comment>
    <node id="1053" parentID="1044" level="2" writerID="0" sortOrder="3" createDate="2009-08-05T09:46:57" nodeName="Seite 2 (1)" path="-1,1044,1053" />
    </relation>
    </relations>

    So with an xslt like this you get the related sites:

    <ul>
    <xsl:for-each select="umbraco.library:GetRelatedNodesAsXml($currentPage/@id)/relations/relation/node">
    <li><xsl:value-of select="@nodeName" /></li>
    </xsl:for-each>
    </ul>

    hth,
    Thomas

  • Horst Sterr 171 posts 133 karma points
    Aug 05, 2009 @ 10:21
    Horst Sterr
    0

    Hi Petr, hi Thomas,
    perfect, problem solved!

    Thank you
    /Horst

  • 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.

Please Sign in or register to post replies