Copied to clipboard

Flag this post as spam?

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


  • trfletch 598 posts 604 karma points
    Jul 15, 2009 @ 18:25
    trfletch
    0

    Listing unpublished nodes

    Is there a way of listing unpublished nodes and having the option to publish them? One reason for this is so that a user of umbraco could go through and create or modify pages then an administrator of the website could view a list of unpublished nodes and publish them once they had checked them over?

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Jul 15, 2009 @ 20:02
    Dirk De Grave
    2

    Sure that's possible, but you'll have to go into the db to find the unpublished documents... Don't have a db to verify, but it should be pretty straightforward.

    Or, even better, donwload Richard's umbMaintenance package. He does list documents, both non published and published documents in a dashboard control. Have a look at the code.

     

    Cheers,

    /Dirk

  • Thomas Höhler 1237 posts 1709 karma points MVP
    Jul 16, 2009 @ 12:12
    Thomas Höhler
    3

    You don't have to go to the db, you can also use the api for it. The example below shows how to use the Published Property of the Document Object. Iterating throght the Documents is much slower than the umbraco.presentation.nodefactory, cause it gets the values from the db not from memmory.

    hth, Thomas

    umbraco.cms.businesslogic.web.Document doc = new umbraco.cms.businesslogic.web.Document(yourNodeId);
    if (!doc.Published)
    {
    Do what ever you want...
    }
  • trfletch 598 posts 604 karma points
    Jul 16, 2009 @ 17:49
    trfletch
    0

    Hi Dirk,

    Thanks for that, it looks like an excellent tool on its own that I will add to the website but it should also help me with creating my comments section.

Please Sign in or register to post replies

Write your reply to:

Draft