Copied to clipboard

Flag this post as spam?

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


  • Fergus Davidson 309 posts 588 karma points
    Sep 18, 2010 @ 13:42
    Fergus Davidson
    0

    Xpath to specify source node from parent property

    hi

    i have a multi language site [each language under seperate node] with a product picker for which i use the tree picker.

    i have a product source picker in the site homepage for each language which allows me to specify the node containing the products for that language site.

    i am trying to reference that node using xpath:

    $currentParent/ancestor-or-self::node [@level = 1]/data [@alias = 'prodSource']

    in short this does not work, though the xpath is correct.

    is it possible to do this currently???

  • Sascha Wolter 615 posts 1101 karma points
    Sep 21, 2010 @ 13:16
    Sascha Wolter
    0

    I assume you are using Umbraco v 4.0.*?

    The Xslt looks alright to me (any reason why you need to use $currentParent here?), how about giving this a shot:

    $currentPage/ancestor-or-self::node[@nodeTypeAlias='your-homepage-alias']/...

    or how about

    $currentPage/ancestor-or-self::node[data[@alias='prodSource'] != '']/...

    Hope that helps somehow,

    Sascha

  • Fergus Davidson 309 posts 588 karma points
    Sep 23, 2010 @ 13:55
    Fergus Davidson
    0

    yes to the version question - v4.0.x, BUT still no joy.

    it seems possible to identify a node using XSLT but not to use a property of a document in the node tree as a reference to identify the required node.

    nevermind.

    any other suggestions?

Please Sign in or register to post replies

Write your reply to:

Draft