Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
The sort of pages in Backend
#1
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!
Reply
#2
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!
Reply
#3
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?
Reply
#4
Untested:
Code:
if ($data->parent != '') {
    $parentdata = getXML($path . $data->parent .'.xml');
    $pagesArray[$count]['sort'] = $parentdata->menuOrder .' '. $data->menuOrder;
} else {
    $pagesArray[$count]['sort'] = $data->menuOrder;
}
“Don’t forget the important ˚ (not °) on the a,” says the Unicode lover.
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!
Reply
#5
Wow... Thank you so much, it seems like to work. Very cool support here!
Reply




Users browsing this thread: 1 Guest(s)