Copied to clipboard

Flag this post as spam?

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


  • Morten Skjoldager 440 posts 1499 karma points
    Mar 27, 2014 @ 11:07
    Morten Skjoldager
    0

    Getting selected node in tree Umbraco 7

    Haya.

    How can i get the selected node in the tree in Umbraco 7 ? 

    I've tried the following approach:

    top.angular.element(top.angular.element("#umbracoMainPageBody")).injector().get('treeService')

    The action node is only getting set when you right click a node. 

    Regards

    Morten

  • Morten Skjoldager 440 posts 1499 karma points
    Mar 27, 2014 @ 16:08
    Morten Skjoldager
    0

    BTW i've noticed that selected node doesn't updated in custom trees, however getting the selected node is possible using:

    top.angular.element(top.angular.element("#contextMenu")).scope().menuNode

    Except that it isn't. It will yield the selected node if your'e in Umbraco tree context, hence not working for a custom tree. Do i have to do anything in particular to make this work? I'm using an old legacy tree support. The tree should be rendered in angular anyways so why is it different ?

Please Sign in or register to post replies

Write your reply to:

Draft