Copied to clipboard

Flag this post as spam?

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


  • Mike Kelly 7 posts 59 karma points
    Jun 17, 2015 @ 15:02
    Mike Kelly
    0

    Finding all documents that have been saved but not published (has pending changes)

    I have a requirement from a customer to create them a dashboard that lists the latest edits on the site.

    So I pointed them at the latest edits dashboard, however they want something a bit more featured.

    Specifically they want to show all pending changes, documents / pages that have been edited and saved but not published.

    They also want to show all pages that have been sent to publish.

    Doing a little research I can see that the Document class on v4 has something I may be able to use .HasPendingChanges but I can't find an equivalent on the Document API.

    Does anyone know of something that would do the same in v7?

  • Steven Harland 78 posts 518 karma points c-trib
    Jun 18, 2015 @ 12:36
    Steven Harland
    100

    Hi Mike,

    Have a look at the Obselete attribute on that method. It says you should just check if the latest version of the content is published. You'll be able to get the latest version using the ContentService in Umbraco 7.

    This could be extremely slow over a large number of nodes though. There might be some way you can leverage the internal index which I believe indexes unpublished content as well as published.

  • Mike Kelly 7 posts 59 karma points
    Jun 23, 2015 @ 10:46
    Mike Kelly
    0

    Thanks Steven, good spot. I'll give it ago.

    On a side note I've also seen theres a new dashboard for 7 which shows unpublished content call "The Dashboard". I couldn't get it to work on 7.2.5 but the source code is available so I'll be seeing how they are pulling in the unpublished nodes.

Please Sign in or register to post replies

Write your reply to:

Draft