What confuses me is that if you use it during development, it seems visitors to the site would see the unpublished documents, so why not just publish them?
Bob
I have a case where the client wants to be able to see unpublished documents while logged in and editing. Since you cant change document group from the front-end that is not an option. After all QuickEdit lets you publish unpublished documents but you need to know where they are. and while logged as manager you can view unpublished docs.
I resolved this with a ditto call in a ’hidden’ chunk. But if I could add these to the live menu (maybe with a different style) this could have worked.
I can think of a few other situations where this could be useful, all involving front-end site management. I have one site with @ 30 editors and some just don’t like to use the manager so by keeping it in the front-end they are happy.
Could you guys satisfy my curiosity about why you would want Wayfinder to work with unpublished docs?
Quote from: BobRay at Mar 02, 2008, 04:13 PM
Could you guys satisfy my curiosity about why you would want Wayfinder to work with unpublished docs?
Personally, I’m interested in this not to include unpublished documents but to ’see through’ them (the way Ditto can).
For example, for a section of the site I might have a home page called ’Features’ which has a template ’section home’. Within that, I want to store individual documents (one per article), but I don’t want them to inherit the ’section home’ template (or various other attributes of that page that get inherited on my site, such as CSS). So, below ’Features’ I create an unpublished container called ’--articles--’ which has the ’article page’ template. I can then create new pages there knowing they will automatically inherit the right template & other values. But in the Wayfinder menu, I would like it to be able to ignore the ’--articles--’ page, instead showing the sub-pages it contains directly below ’Features’.
The actual structure of the documents is:
Features (published)
|
+---- --articles-- (unpublished)
|
+---- article1 (published)
|
+---- article2 (published)
|
+---- ...etc...
But what I want to see in the Wayfinder menu is:
Features (published)
|
+---- article1 (published)
|
+---- article2 (published)
|
+---- ...etc...
'hideUnpublished' => isset($hideUnpublished) ? $hideUnpublished: TRUE, // pixelchutes - work with unpublished documents
$c->where(array('modResource.published:=' => 1));// pixelchutes - Work with unpublished documents
$c->where(array('modResource.published:=' <> ( $this->_config['hideUnpublished'] ? 0 : 2 ))); // fixed
// $c->where(array('modResource.published:=' => 1)); // originalYou can write a snippet called frontEndCMS containing:
[..]I’m wondering if there is a simple way to make it possible for logged in users to show the unpublished documents that Wayfinder now create links for?[..]
if (isset($_SESSION['mgrValidated']))
$modx->setPlaceholder('hideUnpublished', 0);
else
$modx->setPlaceholder('hideUnpublished', 1);$hideUnpublished=`[+hideUnpublished+]`
Downside #2 is I couldn’t find an easy way to the class to the unpublished doc links
[..]As I think already said above it would be great to be able to set a different css class for the unpublished documents.