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?
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.
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... }
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.
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?
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
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
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.
is working on a reply...