Copied to clipboard

Flag this post as spam?

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


  • Phil Crowe 192 posts 256 karma points
    Mar 13, 2012 @ 13:33
    Phil Crowe
    0

    unpublishing using umbraco api doesnt reflect on the font end

      d.UnPublish();
      umbraco.library.UpdateDocumentCache(d.Id);
      umbraco.library.RefreshContent();

    I have been using the above api to unpublish a page. it seems to work in the cms end, the document shows as unpublished, however on the front-end it shows as still being published? is there something else i need to do to refresh the umbraco.config xml?

     


  • Phil Crowe 192 posts 256 karma points
    Mar 13, 2012 @ 14:13
    Phil Crowe
    0

    found the answer. need to use umbraco.library.UnPublishSingleNode(d.Id); after using d.unpublish();

Please Sign in or register to post replies

Write your reply to:

Draft