Copied to clipboard

Flag this post as spam?

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


  • Morten Balle 38 posts 129 karma points
    Feb 07, 2011 @ 10:42
    Morten Balle
    0

    set variable with nodeID from content picker

    Hi

    I'm trying to do this to use some data from another node on my page, but nothing renders.
    "infobox1" is the alias of my contentpicker.

    Obviously it's my variable that I've got wrong.., I just can't figure out how to do them right.

    Any ideas appreciated.

    <xsl:variable name="modelID" select="$currentPage/data['infobox1']" />  
    <xsl:value-of select="$modelID/brandDescription"/>

    Best,
    M;orten

     

  • Rich Green 2246 posts 4008 karma points
    Feb 07, 2011 @ 11:22
    Rich Green
    0

    Hi,

    Let's take this step by step

    What version of Umbraco are you using?

    What do you get when you output the following in XSLT

    *<xsl:value-of select="$currentPage/infobox1"/>*

    Rich

     

  • Morten Balle 38 posts 129 karma points
    Feb 07, 2011 @ 11:58
    Morten Balle
    0

    Hmmm... I get the nodeID 1331

    (get the feeling that I'm looking at a lot of trees here without seeing the forest)

    - using 4.52

     

    M:orten

  • Rich Green 2246 posts 4008 karma points
    Feb 07, 2011 @ 12:19
    Rich Green
    1

    Hey,

    That's good news, you should just need:

    <xsl:value-of select="umbraco.library:GetXmlNodeById($currentPage/infobox1)/brandDescription"/>

    Rich

  • Morten Balle 38 posts 129 karma points
    Feb 07, 2011 @ 13:31
    Morten Balle
    0

    Amazing!

    Thans a lot...

     

    M:orten

Please Sign in or register to post replies

Write your reply to:

Draft