adrianmak Posted November 17, 2016 Share Posted November 17, 2016 When looping the page tree to build a navigation menu, to determine whether a page has child page I always use $page->hasChildren to check for child pages. However this checking is TRUE if for pages created by PageTable field of a template. Link to comment Share on other sites More sharing options...
AndZyk Posted November 17, 2016 Share Posted November 17, 2016 Hello @adrianmak, you could give $page->hasChildren() an selector, for example: $page->hasChildren("template=home|basic-page"); Otherwise I don't know, if it is possible to tell, if a page was created using PageTable, because it is an regular page after all, as far as I know. Regards, Andreas Link to comment Share on other sites More sharing options...
adrian Posted November 17, 2016 Share Posted November 17, 2016 You shouldn't get yourself in a situation where you have some children that are part of a menu and some that are part of a PageTable field - it will be a terrible mess. Avoid this by designating an alternate location for storing the pages for the PageTable field - somewhere under a hidden parent, or even under a dedicated parent under Admin. 4 Link to comment Share on other sites More sharing options...
adrianmak Posted November 17, 2016 Author Share Posted November 17, 2016 1 hour ago, adrian said: You shouldn't get yourself in a situation where you have some children that are part of a menu and some that are part of a PageTable field - it will be a terrible mess. Avoid this by designating an alternate location for storing the pages for the PageTable field - somewhere under a hidden parent, or even under a dedicated parent under Admin. If as you said, put them under the Admin parent, ordinary editor (without superuser role), he cannot add new pages of PageTable . is it possible to put them under the Admin page and ordinary editor is still able to add new pages. Link to comment Share on other sites More sharing options...
adrian Posted November 18, 2016 Share Posted November 18, 2016 Yeah, that is what I have done in the past - no problem with editor role users making new pages - just need to set the template permissions correctly. 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