Posts: 6
Threads: 1
Joined: Sep 2010
Hello,
when I have some pages added, the sort of the pages in Backend confuses me a little bit. Is it possible to change it to sort by menupriority? Maybe can I hack the pages.php for my own needs?
Thanks for your answer!
Posts: 1,848
Threads: 86
Joined: Aug 2009
you would have to end up hacking pages.php like you mention in order to do that. Change lines 42-48 from
Code:
if ($data->parent != '') {
$parentdata = getXML($path . $data->parent .'.xml');
$parentTitle = $parentdata->title;
$pagesArray[$count]['sort'] = $parentTitle .' '. $data->title;
} else {
$pagesArray[$count]['sort'] = $data->title;
}
to
Code:
$pagesArray[$count]['sort'] = $data->menuOrder;
-
Chris
Thanks for using GetSimple! - Download
Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Posts: 6
Threads: 1
Joined: Sep 2010
Thank you for your help. You are true with your solution, but: If I do it like that, the subpages also are ordered by the menuOrder numbers. It should inside the same ordering like outside - like a tree. Is this possible?
Posts: 972
Threads: 27
Joined: Aug 2009
Untested:
Code:
if ($data->parent != '') {
$parentdata = getXML($path . $data->parent .'.xml');
$pagesArray[$count]['sort'] = $parentdata->menuOrder .' '. $data->menuOrder;
} else {
$pagesArray[$count]['sort'] = $data->menuOrder;
}
Posts: 6
Threads: 1
Joined: Sep 2010
Wow... Thank you so much, it seems like to work. Very cool support here!