Joss Posted January 30, 2013 Posted January 30, 2013 I am getting a bit of strange behaviour (that I admit I have not tested properly - I am short of time at the moment) If I create a new page as a child of "home" and choose a template that HAS a template file, then after pressing save, the page is UN published. Good! However, if I create a page as a child of home and choose a template that does NOT have a template file, then after pressing save, the page is PUBLISHED. Not good! This is on the dev version of PW, by the way. Am I missing something? (I usually am)
Soma Posted January 30, 2013 Posted January 30, 2013 A page with no template also is not viewable and has no publish mechanismus. If you want to still have that you could add a publish checkbox and use that in queries assuming you have the data somewhere output. Otherwise you could give it a template for that matter.
Joss Posted January 30, 2013 Author Posted January 30, 2013 The problem is that although it is unviewable, it still ends up on the menu. Oh, and good morning! Edit - I mean, the front end menu
Soma Posted January 30, 2013 Posted January 30, 2013 Thats why i sugested the checkbox. Or you can add a check in your menu code with $page->viewable(). That should ommit pages with no template file. 1
Joss Posted January 30, 2013 Author Posted January 30, 2013 Thanks Soma. I think your second code is the best work-around!
Soma Posted January 30, 2013 Posted January 30, 2013 But then it will be visible until you check it and save it again...
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