Robin S Posted October 11, 2017 Share Posted October 11, 2017 I have just created a new page "Sponsors" under "Home": My question is, how does PW decide that it is going to place this new page between "Form Builder" and "Page Not Found"? Why not at the top or bottom of the existing pages? When I created "Monitoring" and "Groups" the situation was the same and I sorted them manually. This has been bugging me for a while, and I can't see what the rhyme or reason is. First thought was that "pages with system templates get sorted last", but that doesn't hold up because Form Builder uses a system template and Page Not Found does not. Edit: in case it's relevant, the "Tools", "Instructions" and "Form Builder" pages are pre-existing pages that are included in my custom site profile. Link to comment Share on other sites More sharing options...
monchu Posted October 11, 2017 Share Posted October 11, 2017 You can sort them from your home template, under Family tab 1 Link to comment Share on other sites More sharing options...
Robin S Posted October 11, 2017 Author Share Posted October 11, 2017 @monchu, thanks for the reply. It's not quite what I'm asking about - it's the default sort order I'm interested in and why a new page would be inserted in the middle of existing pages. I did manage to figure some stuff out... Firstly, it seems the 404 page, Admin and Trash are always sorted last. There's no changing that, which is fine. Also, looking at the "sort" column of the "pages" table in the DB it looks like there were gaps in the sequence of sort values of pages under Home. Because of those gaps and also the fact that some of the pages that are part of my site profile happened to have high sort values, new pages were being inserted above them in the tree. So I fixed the gaps with... $home = $pages->get('/'); $pages->sort($home, true); // re-build sort values for children of $home, removing duplicates and gaps ...and then I manually gave high sort values to any pages that I want to keep at the bottom of the tree (but still above 404, Admin, etc, as per the above)... $p = $pages(1016); // the Form Builder page $pages->sort($p, 99); // set the sort value to a high number Now new pages are going just where I want them. 6 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