Copied to clipboard

Flag this post as spam?

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


  • Mike 80 posts 101 karma points
    May 17, 2010 @ 22:26
    Mike
    0

    Ultimate Picker Recursive Values Not Working

    Hi,

    I have a master document type with an ultimate picker and a text field.

    I need the values from the picker from the first node in any child nodes when not filled in the child nodes. I can't seem to get the values from the picker. does this work recursivly? If I use the same call on the textfield propery, I get the value from this recursively?

    I tried the pagevalue approach and the xslt call approach with ancestor-or-self::node[position()=1]. this doesnt show anything. If i change [1] to last() I get the result from the first page, but then when I fill in the values in the child page, I only will get the ones from the first page.

    The text field show it's value everytime correctly.

    Any ideas?

    thanks

     

  • Jan Skovgaard 11257 posts 23497 karma points MVP 7x admin c-trib
    May 17, 2010 @ 22:32
    Jan Skovgaard
    0

    Hi Mike

    I think you should read this great article by Lee Kelleher, which explains how to get values from the ultimate picker. http://blog.leekelleher.com/2009/09/08/umbraco-ultimate-picker-xslt-example/

    I hope this helps.

    /Jan

  • Mike 80 posts 101 karma points
    May 17, 2010 @ 22:40
    Mike
    0

    Yes, I have read that post, but I don't get a string with CSV's back .That's the strange thing.

    I have read a post about related links and tried that code and it works... kinda...

    I have this layout of pages:

    home
    |____ Page 1
            |___Page 1-1
    home2
    |____Page 1
    etc.

    In the home-page I have added values to the picker. When I open page 1 or page 1-1 I get the values from home.

    If I add picker values to page 1 and open page 1-1 I get the values from the picker in page 1. Is this the normal behaviour? I thought I would get the values from the home?

    Here's the code:

    [code]

      <xsl:for-each select="$currentPage/ancestor-or-self::node [data[@alias='ultimatepickerfield'] != ''] [1] /data[@alias='ultimatepickerfield']">
        <xsl:value-of select ="."/>
      </xsl:for-each>

    [/code]

    thanks

     

     

     

  • Mike 80 posts 101 karma points
    May 17, 2010 @ 22:41
    Mike
    0

    Code again:

      <xsl:for-each select="$currentPage/ancestor-or-self::node [data[@alias='headerPhotos'] != ''] [1] /data[@alias='headerPhotos']">
        <xsl:value-of select ="."/>
      </xsl:for-each>

     

  • Jeff Grine 149 posts 189 karma points
    May 17, 2010 @ 23:29
    Jeff Grine
    0

    That's the normal behavior. You're getting the first node that has the headerPhotos property(from the current node). Usually that's used to allow a default property to be set at a high level in the tree. Then you set the property at a lower level only if you need to override it. Should be the same thing as using recursive="true" on an item in a template.

    Seems like last() is what you want - not sure why that's not working for you.

Please Sign in or register to post replies

Write your reply to:

Draft