We are transitioning over to a new forum platform. Please post new issues there. Existing threads will be dealt with here unless you choose to move them over. Visit the new forum


Thread tagged as: Question, Discussion, Runway

Output a list of all collections in the system


Just wondering if there is a method to list out information from all the collections available in Perch?

For example, can I return the collection name and slug where I may have collection a, collection b and collection c.

Like a perch_collections(); function.

Marc Sanders

Marc Sanders 0 points

  • 2 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

There's not - what are you trying to achieve?

Going back to a recent topic: http://forum.grabaperch.com/forum/08-25-2017-suggestions-multiple-collections-or-single-collection-approach

I have created two collections to manage the data, to add the ability to filter items to a particular collection, I wanted to output the names and slugs to a particular collection pulled from Perch.

It's probably better to hard code the options here thinking about it