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!
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);
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.
Controlling tree reload after custom save event
Hello,
I have this fun piece of code that runs after a content node is saved.
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!
Ok well this was simpler than I thought, I had tried it before but now it seams to be working:
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
But this is not working for me. Can anyone give me a hand with this?
Thanks!
is working on a reply...