Collections

A collection is a set of things you keep on the site that are not pages, posts or products: projects, testimonials, staff, venues, anything you want to list and reuse. You decide what each thing is made of, add the things, and show them wherever you like. You do not need a developer or a deploy.

Three words come up all the time. A field is one piece of information about a thing, such as its name or a photograph. An item is one thing in the collection, with a value for each field. A list is a block on a page that shows many items.

After this chapter you can create a collection, add items, show them on a page, give each its own page and choose which items a list shows and in what order.

Create a collection

  1. Open Collections in the sidebar and press New collection.
  2. Type a Name, such as Projects.
  3. Check the Key. It is filled in from the name, in lowercase letters, digits and hyphens, and it cannot change once the collection exists.
  4. Check the Path, where the items' pages live. It starts as / followed by the key, so /projects.
  5. Tick Items have their own page if each item should have a page of its own. You can change this later.
  6. Press Create.

Define the fields

Every collection starts with a Title field. You can rename it, but not remove it. Add the others on the Fields tab, which admins see:

  1. Press Add field.
  2. Type a Label, which is what editors see. The field's name follows the label and is fixed once saved.
  3. Pick a Type: Text, Rich text, Image, Link, Number, Date, Date & time, Choice or Yes/no.
  4. Tick Required if every item must have a value. Add a Hint to help whoever fills the field in.
  5. For a Choice, press Add choice once for each option.
  6. Press Save.

Removing a field removes its value from every item at once, and you are asked to confirm. Changing a field's type is refused once any item has a value for it.

Add items

  1. Open the collection and stay on its Items tab. Press New item.
  2. Fill in the form. An Image field opens the media picker, a Link field opens the link dialog, and a Date & time field is read and written in the site's own time zone.
  3. Check the Slug. It is suggested from the title and is used in the item's page address. It is fixed once the item is created.
  4. Press Save, or Save and exit to go back to the list of items.

The Items tab is a table. The up and down arrows on each row change the order, which is the collection's own order and the default order of every list. Tick Hidden, on the row or in the form, to take an item out of every list and its own page without deleting it.

Show a collection on a page

  1. In the page editor, drag a List of… block onto the page.
  2. Set Source to your collection.
  3. Choose a Layout: Columns, Rows or Slider. Columns and Slider show 1 to 8 Columns per row, which can differ by screen size.
  4. Set How many items to show, and, if you want, a Filter and an Order (explained below).
  5. Build one item in the block's Item slot. The next section shows how.

Set Link the whole item to Yes to turn each item into a link to its own page. Pages and blocks covers the other list settings, such as the slider's arrows and paging through long lists.

Connect the item's blocks to its fields

You design one item from ordinary blocks, and the list repeats it for every item. To make a block show a field, connect it instead of typing the content in.

  1. In the Item slot, add a Text, Image, Button, Link or Icon block.
  2. Open the block's Connect to item group.
  3. Pick the field. Each choice lists only the fields of a fitting type. “Not connected” leaves the block as you wrote it.

What a block can connect to:

  • Text shows any field except images and links. It can be a heading, with an Element of Heading 1 to 4, and can have a Prefix, such as “Year” before a number. For a Date & time field, Show time set to No shows only the date. Yes reads as and No reads as set the words for a Yes/no field.
  • Image takes its picture from an Image field. It can take its alt text and caption from text fields.
  • Button, Link and Icon take their destination from a Link field, or from “Item page”, which links to the item's own page. Button and Link can also take their label from a field.

Switch on Hide when the link is empty on an Icon, Button or Link so an item with no link shows nothing. That suits a team list where not everyone has a social profile. A linked Icon still needs a label, typed in or connected. A block you leave unconnected shows its own text or placeholder, which is also what the editor shows before anything is connected.

Give each item its own page

With Items have their own page ticked, the collection gets an item template, named after it, such as “Projects item page”. Open it from Content → Templates, or from the collection's Settings tab, where the link is called Edit item page.

Build it as you build a list item, with Text, Image, Button and Link blocks connected to the page's own item. One template makes the page for every item. A hidden item, or a collection with item pages switched off, shows a page-not-found.

Choose which items a list shows

A list's Filter has one entry for each field that can be filtered. Every entry you set must match.

  • Yes/no: Any, Yes or No.
  • Choice: a tick box for each option. None ticked means any. Two or more match an item with either.
  • Date and Date & time: a When of Any, Upcoming, Past, Between dates, Next days or Last days. Upcoming and Past compare with this moment, or with today for a plain Date. Between dates takes a From and a To. Next days and Last days take a number of Days. An item with no value for the field never matches a date filter that is set.
  • Date & time only: Between date & times takes two date-and-time pickers, read in the site's time zone. Use it to split a day into sittings, such as a morning, an afternoon and an evening list. The end is not included, so an item at exactly the end time belongs to the next list. Either end can be left blank.

The Order list starts with Collection order, the order from the Items tab and the default, then Newest first and Oldest first. After those come the Title and every Text, Number, Date, Date & time, Choice and Yes/no field, each in both directions: A–Z and Z–A for text, low to high and high to low for numbers, earliest first and latest first for dates, no first and yes first for Yes/no. A Choice sorts in the order of its options on the Fields tab, “in list order” or “reverse list order”, not alphabetically. An item with no value for the field always sorts last, whichever direction you choose.

A Date & time field is a date with a time of day, in the site's own time zone, which an admin sets in Settings → Site under Time zone. A plain Date has no time and no zone. Changing the time zone changes how every stored date and time is shown, not the moments themselves.

Change a Choice later

Rename a Choice option on the Fields tab by editing its text in place. Every item that held the old text then holds the new one. Removing an option is refused while any item still holds it, unless you renamed it in the same save. Rename it, or change those items first, and then remove it.