Collections

Collections are used a lot like content regions, but have some key differences.

Differences between Collections and Regions

  1. Regions are tied to a page or (for shared regions) to every page. Collections are not tied to any page.
  2. Collections are versioned per item, regions are versioned per region
  3. 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.

  1. Create a collection from the Collections section under Pages
  2. Find your page and go to the Page Options
  3. 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

  1. Go to Collections and click through to your collection
  2. Select Options in the smartbar
  3. 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.

  1. Create your new collection
  2. In the collection, go to the Import tab
  3. Select the page the region is on, click next
  4. Select the region, click next
  5. 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 perch_content_custom().