thomas Posted January 7 Posted January 7 Hello, please excuse if this has been discussed before. I was wondering if I can sort a pages array by the admin sort order of items in a pages field? Explanation: I have several pages which all have one category attached to it (in a single item pages field). These categories are sorted in a specific way in the backend. I would now like to sort the pages so the ones from the first category show up first etc. I would really like to avoid splitting things up and iterating over categories as well. Second option might be to add 1, 2, 3 or something to the category names and later strip it for display but I was wondering if there is a more ProcessWire-y way of doing this 🙂 This is what didn't work: $pages->find("template=members,sort=kategorie.sort,sort=title); * EDIT * It does work! Sorry! (Ican't find an option to delete this post ...) Thanks thomas
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now