Copied to clipboard

Flag this post as spam?

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


  • ask 28 posts 48 karma points
    Aug 27, 2010 @ 11:13
    ask
    0

    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

  • Sascha Wolter 615 posts 1101 karma points
    Aug 27, 2010 @ 13:11
    Sascha Wolter
    0

    Hiya,

    can you give

    d.XmlGenerate(new XmlDocument());

    a try? Don't know though if that particularly works in case of unpublishing a node, yet worth a shot I guess.

    Sascha

  • ask 28 posts 48 karma points
    Aug 27, 2010 @ 15:24
    ask
    0

    it didn't work for me..

  • Morten Bock 1867 posts 2140 karma points MVP 2x admin c-trib
    Aug 27, 2010 @ 15:30
    Morten Bock
    0

    You want to remove it from the cache?

    This should do it:

    library.UnPublishSingleNode(d.Id);

     

  • ask 28 posts 48 karma points
    Aug 31, 2010 @ 06:48
    ask
    0

    still not reloading on unpublishing.. am i missing any other thing?

  • ask 28 posts 48 karma points
    Sep 01, 2010 @ 12:54
    ask
    0

    any other pointers folks?do i need to use any scripts?

  • Morten Bock 1867 posts 2140 karma points MVP 2x admin c-trib
    Sep 01, 2010 @ 17:02
    Morten Bock
    0

    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
    

     

  • ask 28 posts 48 karma points
    Sep 01, 2010 @ 19:51
    ask
    0

    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

     

     

     

     

  • ask 28 posts 48 karma points
    Sep 02, 2010 @ 13:19
    ask
    0

     

    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

     

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Sep 02, 2010 @ 14:25
    Richard Soeteman
    1

    The ReloadParentNode is replaced in 4.5.1. I think you need to use

    ClientTools.RefreshTree() for 4.5.x

    Cheers,

    Richard

Please Sign in or register to post replies

Write your reply to:

Draft