Copied to clipboard

Flag this post as spam?

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


  • Eise van der Spoel 10 posts 90 karma points
    Jun 14, 2013 @ 12:50
    Eise van der Spoel
    0

    [XPATH] Get value from parent node in DropdownList

    Umbraco version: 4.9.1

    I want to filter my nodes in the custom data type I created. I use a XPath DropDownlist for this. My problem is that I can't select the parent property id and check this in the XPATH.

    Doesn't work:

    //Landen/Land [@id= $currentPage/../node[@alias = 'landSelectLand']]/Regio

    //Landen/Land [@id= ../data[@alias = 'landSelectLand']]/Regio

    Works with static:

    //Landen/Land [@id= 1200]/Regio

    My scheme:

    - Countries
    --- Belgium <-- Country (has a country bouned to it (landSelectLand))
    ---- Ardennes <-- Region
    --- The Netherlands <-- Country (has a country bouned to it (landSelectLand))
    ---- South Holland <-- Region

    When i create a document say a country Holland and bound it to the 'Land' The Netherlands, this works, Bellow this country I create a Region, say SH and bound it to South Holland. I want to show only the Regions that are defined below that country.

     

  • Eise van der Spoel 10 posts 90 karma points
    Jun 14, 2013 @ 13:42
    Eise van der Spoel
    100

    Got it working with:

    //Landen/Land [@id = $currentPage/../landSelectLand]/Regio

Please Sign in or register to post replies

Write your reply to:

Draft