hayden.w Posted December 5, 2012 Share Posted December 5, 2012 Hello, My First post here on PW! My question: Is is possibe to save pages as unpublished? I want to do this as i have made a template allowing users to add their own pages but i want an admin user to publish them. I have tried setting the follwing setting before saving but does not seem to work: $pg->settings['status'] = 2048; Many Thanks Link to comment Share on other sites More sharing options...
AnotherAndrew Posted December 5, 2012 Share Posted December 5, 2012 Hayden, welcome to PW. The ability to publish and unpublish has been made into a module. You can download it here. After you have installed it, you can click on your page in the admin and publish / unpublish it. There is also another module to hide / show a page. I'm not really sure what the difference between the two but I'm sure someone will explain shortly. Link to comment Share on other sites More sharing options...
Exceptionz Project Posted December 5, 2012 Share Posted December 5, 2012 I think you are looking after this: $page->addStatus(Page::statusUnpublished); 1 Link to comment Share on other sites More sharing options...
Soma Posted December 5, 2012 Share Posted December 5, 2012 A quick look on the cheat sheet with "status" would have revealed it: http://processwire.com/api/cheatsheet/?advanced=true&filter=status Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now