Reloading / refreshing current node in the GUI from custom datatype
Hey guys,
I realise that theres a(/some) similar topic(s) but none of them are in the right section nor provide a working solution, so I figured I'd create a new one.
I'm trying to reload the content of the current node/page from my custom datatype so that my gui will be updated after save or save&publish. I've been looking for a built-in js-function but haven't been able find anything useful anywhere, thus i ask:
How would you go about doing this from a custom DataType?
A previous topic suggested to use Response.Redirect, but doesn't seem to work for me, even if i try to disable caching, alot of my code prior to the call is skipped.
In all Umbraco version pre 4.1 (which isn't released yet), there's no real public tree API. You would have to look into the crazy codebase of xTree (which is what runs the tree in pre 4.1). It's not pretty and it's buggy so it's not going to be the nicest experience :) It is possible though if you have a lot of perserverence. The GOOD news is that xTree is gone in 4.1 the entire tree structure has been re-written from the ground up using jsTree AND there's actually a .Net Umbraco API that you can call from c# to interact with client code. For instance, in 4.1 you can just do BasePage.Current.ClientTools.SyncTree(....) which will render the correct JavaScript to resync any particular node you want ;)
Reloading / refreshing current node in the GUI from custom datatype
Hey guys,
I realise that theres a(/some) similar topic(s) but none of them are in the right section nor provide a working solution, so I figured I'd create a new one.
I'm trying to reload the content of the current node/page from my custom datatype so that my gui will be updated after save or save&publish. I've been looking for a built-in js-function but haven't been able find anything useful anywhere, thus i ask:
How would you go about doing this from a custom DataType?
A previous topic suggested to use Response.Redirect, but doesn't seem to work for me, even if i try to disable caching, alot of my code prior to the call is skipped.
Thanks a bunch,
Joakim
In all Umbraco version pre 4.1 (which isn't released yet), there's no real public tree API. You would have to look into the crazy codebase of xTree (which is what runs the tree in pre 4.1). It's not pretty and it's buggy so it's not going to be the nicest experience :) It is possible though if you have a lot of perserverence. The GOOD news is that xTree is gone in 4.1 the entire tree structure has been re-written from the ground up using jsTree AND there's actually a .Net Umbraco API that you can call from c# to interact with client code. For instance, in 4.1 you can just do BasePage.Current.ClientTools.SyncTree(....) which will render the correct JavaScript to resync any particular node you want ;)
I ended up doing some things differently and overriding OnLoad, so I'm glad I didn't have the needed perseverance in this case ;D
That sounds totally sweet though - I'm already looking forward to 4.1!
is working on a reply...