Perch documentation

Repeating Regions

In your site you may wish the editor to be able to add repeated areas of content – for example list items, articles or repeating blocks in the sidebar. Perch makes this really easy.

When defining a template for a region – such as the sidebar module we created in an earlier video – we can check ‘allow multiple items’. The admin interface will then give two buttons – to save the edited region or save and add another.

Switching back to our page we can see that we have two sidebar modules displayed.

If you have an existing region you can also set it to allow multiples on the Options page for that region.

Once you have a multiple item region the options page changes to give you more control.

If editing the content all on one page becomes cumbersome, you can switch your region to list detail view. You can then edit one item at a time.

You can choose if new items get added at the bottom or top.

You can also effect how items are displayed. The Sort By drop down picks up all fields that have been added to the form, you can choose which one to sort by. You can then choose a sort order, sorting ascending or descending on the field that you chose. For example if you had a listing of people with a surname field in your template, you could choose to sort by surname in Ascending order to always display the listing in alphabetical order by surname no matter which order the admin entered them.

If you want to restrict the number of items displayed you can add a value in Number of Items to display.

These simple options can give you a great deal of flexibility in how content entered into a Perch region is displayed.