Copied to clipboard

Flag this post as spam?

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


  • Simon Yohannes 58 posts 188 karma points
    Sep 28, 2010 @ 16:18
    Simon Yohannes
    0

    how do you expand(and load) / close content tree nodes using javascript in backoffice

    what are the javascript calls i need to make to manually open/close a particular node?

    if there is relevant documentation please point me to it!

    thanks,

    Simon

  • marthin 87 posts 106 karma points
    Sep 28, 2010 @ 16:52
    marthin
    0

    Do you have a custom section? Could you explain more exactly what you are trying to do?

    I think you could use something like

    UmbClientMgr.mainTree().selectNode(yourNodeId);

    To select it, not sure if this will open though. There are alot of other options you could try.

    Check in UmbracoClientManager.js located in umbraco_client/application folder.

    Best Regards

    Marthin

     

  • Simon Yohannes 58 posts 188 karma points
    Sep 28, 2010 @ 17:12
    Simon Yohannes
    0

    thanks Marthin.

    i did look in those files but failed to find what i was looking for.

    in the backoffice, if you double click a node, it will expand to show its childnodes.

    i merely want to replicate this behaviour in code using javascript.

    the problem is that i don't know much about the UmbracoTreeAPI/UmbracoTree object (umbraco.controls.umbracotree is where you can find the object when debugging in firebug) which is where these behaviours are defined.

  • Simon Yohannes 58 posts 188 karma points
    Sep 29, 2010 @ 16:45
    Simon Yohannes
    0

    thanks again Marthin, the following code expands a node:

    //obviously the number in the jquery selector needs to be changed to the ID of the node you want to expand.

    UmbClientMgr.mainTree()._loadChildNodes($("#1234"));

     

     

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies