Forum
Sorting by page order
Using perch_content_custom, I'm trying to sort a region from multiple pages by page order set in the admin interface. This way, I would be able to reorder the pages in the admin, then use a sort value in perch_content_custom to list the results accordingly. Is this possible?
By default, they appear in the order I post the pages, starting with the last post first.
This doesn't seem to work:
<?php
perch_content_custom('Main content', array(
'page'=>'/custom-web-sites/*',
'template'=>'web_site_project_list.html',
));
?>
nor does this:
<?php
perch_content_custom('Main content', array(
'page'=>'/custom-web-sites/*',
'template'=>'web_site_project_list.html',
'sort'=>'_order',
));
?>
Forgot to add e-mail notifications. Replying so I can check that off.
You can't sort items by the order of their page, no.
Ok, so if I want to control the order of them using perch_content_custom, I would need to put an "order" field in the region and then sort by that? Would you recommend a specific way of doing that?
It's not something I've ever done, so I don't have a specific recommendation. But yes, generally speaking that's what you'd need to do.
Ok, thanks!