I want to sort (and paginate) entries from a structure section based on the number of descendants. This is the effective criteria I want to query:
craft.entries.section('myStructure').level(1).order('descendants desc')
Since getDescendants.count()
is not a number stored against each entry in the database (AFAIK), how does one go about getting this result?