Jump to content

Sort based on original sort order of a page field


pers0n
 Share

Recommended Posts

I'm having a issue, where I need to find all the artwork, but have it sort based on the artistpage, but its doing it based on the alphabetically ordering, not the actual ordering of all my artistpages, which I have dragged into a specific order.

$pages->find('template=artwork, sort=artistpage');

I've checked to make sure "sort" is not set under any children for anything.

Link to comment
Share on other sites

I think it's expected behaviour.

Here's a quote from the site:

  Quote
There is a reserved-word for selectors called "sort" and it may be used to specify what order should be returned by the matches. Here is an example of it's usage:
sort=title

That essentially says to sort the results by their "title" field, A-Z. If we want to reverse the sort, we just precede "title" with a minus sign, like this:

sort=-title

That would return results sorted by the "title" field, Z-A.

Don't know how to make it work the way you need it though :huh:

Edit: Just had to read a little further :)

Use this:

sort=sort

Edit 2: Nevermind, I have to sleep more :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...