Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Is it possible from server side code to refresh a portion of the content tree? My current theory is if I listened to the content service published event and determined that the content tree on the left should be refreshed - can I send this instruction to the client's browser?
I'm working on this:
I'd really like to trigger the content tree to refresh so the icon shows immediately upon publishing.
I've taken a different approach since I started this topic. For anyone landing on this b/c they are trying to refresh the currently selected item in the tree, from C#, I have no idea.
I've changed my approach and thus was able to do a lot of the things I wanted through the appState, treeService, and navigationService (client side). Even this was a conundrum. It's actually very easy to tell Umbraco to "refresh the currently selected node" but I honestly don't know what that does. It certainly didn't hit my custom tree rendering code, so it didn't get the updated icon.
I finally used a combination of these services to reload the node children, and then used the sync tree method from the navigation because the active/highlight was lost in some instances.
And I've done more backend programming than I'd ever like to. I've probably done a lot of things wrong, but I'm not going to prevent that from releasing this as an Umbraco Package soon. I'll learn live. Hopefully someone might be interested enough to contribute, help me clean it up, teach me a thing or two.
A video of my progress.
I've released my first nuget and umbraco package [scary].
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted