Copied to clipboard

Flag this post as spam?

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


  • Sébastien Richer 194 posts 430 karma points
    Apr 03, 2013 @ 20:35
    Sébastien Richer
    0

    Controlling tree reload after custom save event

    Hello,

    I have this fun piece of code that runs after a content node is saved.

    Document.AfterSave += AfterSave;

    This basically performs custom operations (moves nodes, sets values, sets templates, etc.) and also automatically creates a "year / month" content node structure for special document types. All this is fine.

    When this code runs, my backoffice left panel (the one with the tree) reloads completely. This is a problem for me because the user then "loses his location" in the content tree and have to navigate back to where he was to keep working.

    I do like that it reloads since content has moved, but I would like to be able to control the depth from which it reloads so that I can perform that reload at the proper depth.

    If someone could point me in the good direction that would be fantastic!

    Thanks!

  • Sébastien Richer 194 posts 430 karma points
    Apr 04, 2013 @ 16:25
    Sébastien Richer
    100

    Ok well this was simpler than I thought, I had tried it before but now it seams to be working:

    var tools = BasePage.Current.ClientTools.ShowSpeechBubble(BasePage.speechBubbleIcon.info, "Some message", "More of that message");
    tools.SyncTree(sender.Parent.Path, true);
  • Sébastien Richer 194 posts 430 karma points
    Apr 05, 2013 @ 17:47
    Sébastien Richer
    0

    Ok no actually it's gone back to not working anymore and I can't get it to work again. I have no clue what's going on and I'm running out of time :(

    I'm running Umbraco 4.7.2. This is basically a automated thing for moving "News" into year and month folders. My left content panel keeps refreshing and going back to the home node.

    I've seen so many posts that say to use this

    BasePage.Current.ClientTools.SyncTree(sender.Path, true);

    But this is not working for me. Can anyone give me a hand with this?

    Thanks!

     

Please Sign in or register to post replies

Write your reply to:

Draft