Erik Richter Posted July 16, 2020 Share Posted July 16, 2020 Hey guys, Im trying to sort pages depening on the count of pages who has them selected as page reference (the new owner selector might be handy for this?). my array is: $array = $pages->find("template=xx, sort=-profile_linked, sort=title"); I want to add a third sort which sorts the count of pages that have the array pages in a page reference field called "refField". What I tried: $array = $pages->find("template=xx, sort=-profile_linked, sort=title, sort=refField.owner.count"); Obviously this isn't working.. can I use the owner-selector for this at all? Or what would be the best practice? Thanks in advance! Link to comment Share on other sites More sharing options...
Robin S Posted July 16, 2020 Share Posted July 16, 2020 I'm not sure if sorting like that is possible using "owner", but scenarios such as this are what prompted the Connect Page Fields module. Link to comment Share on other sites More sharing options...
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