Collections are used a lot like content regions, but have some key differences.
Differences between Collections and Regions
- Regions are tied to a page or (for shared regions) to every page. Collections are not tied to any page.
- Collections are versioned per item, regions are versioned per region
- Collections can be added to any number of pages, and to the app menu
Adding a collection to a page
Adding a collection to a page enables you to provide a logical editing experience for your client. You might have a collection of news articles, and also a News page that displays them. Make life easy for your client by linking the collection from the News page, which is where they’d probably expect to find it.
- Create a collection from the Collections section under Pages
- Find your page and go to the Page Options
- You should see your collection listed in the Collections section. Check the box to add it to this page, and save.
When you go to edit the page, the collection should now be listed with the page’s regions. Clicking on it jumps you through to the collection edit page.
Adding a collection to the app menu
- Go to Collections and click through to your collection
- Select Options in the smartbar
- Check the Include in App Menu option and save.
Your collection will now appear in the app menu. When you edit items from the collection, the app menu will highlight your collection.
Importing from a Region to a Collection
When moving from a Perch site to Runway, or if restructuring a site because it’s grown in ways you didn’t expect, it can be useful to import one or more regions into a collection.
To do this, the structure of the region(s) and the collection must be compatible - their templates need to include the same IDs and types.
- Create your new collection
- In the collection, go to the Import tab
- Select the page the region is on, click next
- Select the region, click next
- You’ll be asked to confirm your choices, click Import
Displaying content from collection
Content is displayed using the
perch_collection() page function, which works in the same way as