pageList order not same as sitemap
So I am using this to get the pageList
$pageList = Loader::model('page_list');
$pageList = new PageList();
But the list order is not the same as the sitemap, some child pages are listed on outside of their parents. How do I create the list array in the exact sitemap order, with children listed after their top level?
alternately, is there is a solution for Next/previous that will go from homepage to every page in site?
thanks for your help.
I assume what you want is for the "next" link to go to the current page's first child page if children exist, and if not then to go to a sibling page, and then if that doesn't exist go back "up" to the parent's sibling? You could try extracting out the code from the autonav block (which *does* generate a sitemap hierarchy), or maybe even simpler is to just code in the logic outlined above (on each page, look for child pages and link to the first one if it exists, otherwise link to next sibling page if it exists, otherwise link to parent's sibling page if it exists, etc.)
Going to be a huge ordeal any way you slice it -- might be best off just having a block that users place on a page with a manual selection of which page to link to.
you might start with this block:http://www.concrete5.org/marketplace/addons/next-previous/
and then just hack it to not "go around the bend" when it gets to the last page in a level but instead go up/down or whatever you're thinking for navigating the tree this way.