Sitemap API help

Permalink
Hello all, does anybody know if there is a way via the API to rearrange the order of child pages under a certain collection ID based on a custom page attribute (date attribute) inside the sitemap? (not using 5.5)

Thanks.

mdzoidberg
 
mdzoidberg replied on at Permalink Reply
mdzoidberg
Anybody? :)
guythomas replied on at Permalink Reply
guythomas
Are you talking about the sitemap.xml file?
mdzoidberg replied on at Permalink Reply
mdzoidberg
The sitemap link under the dashboard, I'm looking for a way to rearrange some pages under a section based on a custom date page property via the API. I will run a job and rearrange the pages based on their custom date instead of the order they were added.

or

Maybe using the autonav with a custom template is there a way to sort certain pages based on a date property? for instance you have 50 pages but you want to sort 10 of those under a parent based on their custom date property while the others are just sorted normally (by normally I mean whatever you choose within the block options).
guythomas replied on at Permalink Reply
guythomas
Sounds like you will want to use the "page list" block as a starting point rather than the auto nav..

The page list block has the ability to sort by most recent.. if you need to sort by a custom page attribute instead you will have to make your own block using the methods used in the page list block.

You will need to get familiar with the listing and sorting functions of the C5 library found here:

http://www.concrete5.org/documentation/developers/system/searching-...
guythomas replied on at Permalink Reply
guythomas
Made a mistake, here is the URL I was thinking of when I posted above..

http://www.concrete5.org/documentation/developers/pages/searching-a...

If you want to combine two different sorting types in a single list, you will definitely need to code something yourself. your initial inclination may be to build a custom template for the page list block, but unfortunately, the sorting is done at the controller level.
mdzoidberg replied on at Permalink Reply
mdzoidberg
Yeah, I was afraid of having to use the page list option, not that is bad but I wanted to do this from within the dashboard via a job, maybe I can use the movePageDisplayOrderToTop() function and move the pages with the attribute is_featured to the top. looks like the DashboardSitemapExploreController handles the sorting with that function.