Jump to content
Erik Richter

Selector SORT by count of owner/pages referencing?

Recommended Posts

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!

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...