Forum

Thread tagged as: Question, Discussion, Runway

Output a list of all collections in the system

Hey,

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

  • 4 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: https://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