Add a non-published page via sitemap

Permalink 1 user found helpful
When I add a new page via the "Add a Sub-Page"-button in the admin bar, the page is not immediately published. I can edit the page and it remains un-published until I click on "Publish My Edits".

However, I prefer to add new pages via Dashboard > Full Sitemap > Add Page. But when I do this, the new page is immediately published. That means all visitors see an empty page until I add some content. And sometimes, adding content can take a while ...

So, my question is: Is it possible to add a non-published page via the sitemap? Where do I have to change/override the core files to achieve that functionality?

Thanks!
Karl

View Replies:
Apos replied on at Permalink Reply
Apos
Here is a workaround:

Add an unpublished page, name it "hidden".

Now add your pages as a sub-page of "hidden". When you are ready to publish it, move it under the page it is supposed to be under.

This will have to added benefit of allowing you to know whether a page has been published or not.

Visual representation:

-Home
--News
---Page 01
---Page 02
--Hidden
---Page 03

Where "Page 03" will not be accessible by your viewers since it is under "Hidden".
karlertl replied on at Permalink Reply
Your workaround works fine, of course. Thanks for your answer.

But actually I wanted to know if there's a (simple) way to override some code in the core files so that newly added pages aren't published immediately.
mrowell replied on at Permalink Reply
mrowell
Karl,

I don't if solved this but there is an attribute you can have in the array when you create a page using $page->add() that will create the page without publishing a version.

Check it our athttp://www.concrete5.org/community/forums/customizing_c5/programati...
karlertl replied on at Permalink Reply
Hi Marcus,

thanks for your hint, but actually I'm looking for a way to add unpublished pages via the sitemap.

I very often use "replace_link_with_first_in_nav" on top-level pages. So, if I click on a link in the main navigation, I actually land on a second-level page:

www.my-domain.com/top-level/second-level


If I want to add another second-level page, I first have to delete the final part of the URL to get back to to the top-level page:

www.my-domain.com/top-level


From here, I can add a sub-page via the button in the admin bar.

This is not difficult for me, of course. But sometimes, it's not easy to explain to clients ... This is the reason why I prefer to add pages via the sitemap.

Karl
ScottC replied on at Permalink Reply
ScottC
could you just mark the page to be in the future for a few weeks for the date public?
karlertl replied on at Permalink Reply
Of course. But this is even more "complicated" than deleting the final part of the URL ...