Maybe I am not understanding the question correctly. What exactly are you trying to do? What is it that you want to reload? The cache? The content tree? Something else?
The correct way to unpublish a document is to use both these methods:
d.UnPublish(); //Unpublish the document in the database
library.UnPublishSingleNode(d.Id); //remove the document from the content cache
reload nodes on unpublishing
hello folks.,
how to reload nodes on unpublishing?
i have tried with this but not working as expected..
d.UnPublish();
library.UpdateDocumentCache(d.Id);
library.RefreshContent();
any pointers..
thank you
Hiya,
can you give
a try? Don't know though if that particularly works in case of unpublishing a node, yet worth a shot I guess.
Sascha
it didn't work for me..
You want to remove it from the cache?
This should do it:
still not reloading on unpublishing.. am i missing any other thing?
any other pointers folks?do i need to use any scripts?
Maybe I am not understanding the question correctly. What exactly are you trying to do? What is it that you want to reload? The cache? The content tree? Something else?
The correct way to unpublish a document is to use both these methods:
okay i will explain..
i refered this link for implementing unpublish context menu item http://www.richardsoeteman.net/2009/05/04/UpdateAddingMenuItemsUsingTheEventSystem.aspx
when i right click on a node and select unpublish, node gets unpublished but it is not getting refreshed instantly..
everytime i need to select reload node option to verify it..
thus i am trying to reload node instantly after the node is unpublished..
i am using umbraco v 4.5.1
i used this for reloading of nodes..
this one works in previous version of umbraco..
((BasePage)d.HttpContext.CurrentHandler).reloadParentNode();
but it is not working in new version..
thank you
The ReloadParentNode is replaced in 4.5.1. I think you need to use
ClientTools.RefreshTree() for 4.5.x
Cheers,
Richard
is working on a reply...