Forum

Thread tagged as: Question, Runway

Filter for "maximally one of each kind" in perch_collection?

I'm outputting a few random teasers for items of a larger collection.

Some of these items are similar, they have the same image and similar titles.

If the random output produces two of those similar items, it doesn't look good.

So I'd like to tell perch_collection() to pick "maximally one entry of a kind". It would be simple assign that "kind" by categories or relation.

Is it possible to tell the page function to output max. one item per said category? If so, how?

Urs Bräm

Urs Bräm 1 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

No, I don't think that's possible to do.