Copied to clipboard

Flag this post as spam?

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


  • Craig O'Mahony 364 posts 918 karma points
    Mar 27, 2015 @ 11:26
    Craig O'Mahony
    0

    Getting Value from Multi Node Tree Picker

    Hi all,

    I'm using Umbraco 7.2.4 and I've created a data type of multi node tree picker and have associated this to relative content. In the content tree i can use the Tree Picker to select one or more areas of content so all is well to this point.

    But I'm struggling to get the data back out in Razor (what I'm trrying to return is comma separed list of the selected nodes) but I seem to get to the data.

    I would have thought that @CurrentPage.GetProperty("tutorSelector") would work but nothing is being returned.

    Any help would be greatly appreciated.

    Thanks,

    craig

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Mar 27, 2015 @ 11:27
    Jeavon Leopold
    102

    Hi Craig,

    Take a look at the Razor sample here.

    Jeavon

  • Craig O'Mahony 364 posts 918 karma points
    Mar 27, 2015 @ 11:36
    Craig O'Mahony
    0

    Bloody marvellous!

    Thank you very much.

    Ps. I love this community!

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Mar 27, 2015 @ 11:40
    Jeavon Leopold
    0

    You're very welcome!

  • jeff juarez 4 posts 74 karma points
    Mar 06, 2017 @ 11:55
    jeff juarez
    0

    Chief,

    How will i get the Tree Picker Node Link page value so that i will put it to the target HREF link template whenever the user clicks the node.

    Thanks,

    ~Jeff~

  • Lewis Logan 21 posts 132 karma points
    Mar 26, 2019 @ 11:34
    Lewis Logan
    0

    Hi,

    In response to Jeff's question (Albeit one year late), today I was looking for an answer to a similiar question.

    For anyone looking for something similar I was able to achieve this via:

    Model.Content.GetPropertyValue<IEnumerable<IPublishedContent>>("MultiTreePickerNodeName").First().Url;
    

    Store this as a variable and then use this as your href. If you don't need the first item then you will need to loop through the collection.

    Hope this helps someone. Kind Regards,

    Lewis

Please Sign in or register to post replies

Write your reply to:

Draft