Copied to clipboard

Flag this post as spam?

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


  • Jeremy Wiggins 7 posts 40 karma points
    Jan 21, 2012 @ 20:00
    Jeremy Wiggins
    0

    Refresh node's parent in content tree from action handler

    I've seen similar posts on this, but none that I have read have addressed my exact problem.

    I have an action handler that is called when a node is published.  I would like for the last thing the action handler does be to refresh the content tree, starting at the node's parent.

    Assume the following structure:

    - Z
        - Za
        - Zi
        - Zu

    Suppose I publish the node, "Zi".  I would like for the "Z" folder to refresh (and keep "Zi" selected in the editor).

    Is this possible?

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Jan 21, 2012 @ 20:05
    Jeroen Breuer
    0

    Have a look at this topic: http://our.umbraco.org/forum/developers/api-questions/19130-Reloading-parent-node-in-tree-without-having-to-reload-the-whole-tree.

    You can use this:

    umbraco.BasePages.BasePage.Current.ClientTools.SyncTree(doc.Parent.Path, true);

    Jeroen

  • Jeremy Wiggins 7 posts 40 karma points
    Jan 21, 2012 @ 20:07
    Jeremy Wiggins
    0

    Hi Jeroen,

    I tried that.  And perhaps I misphrased my question.

    That did reload the tree, but it collapsed all nodes.  Using the example I gave, is is possible to keep the "Z" node expanded after the tree refresh?

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Jan 21, 2012 @ 20:11
    Jeroen Breuer
    0

    Hmm not sure if that is possible. If you refresh the node I think this is default behavior. Would need to invest more. Perhaps you can test what other methods the ClientTools has to see if there is something you can use.

    Jeroen

Please Sign in or register to post replies

Write your reply to:

Draft