Data

A collection is a table the pages show: a menu, a price list, products, a timetable of classes. Each row is one entry and each column one of its values. The rows are written once, in Data, and every page that shows the collection shows them as they are, so a new price is changed in one place.

On a site with several languages each collection has a copy in each language, listed with its language beside the name. A page shows the copy of its own language.

The Data section of the Bistro Verde starter: the collection menu open as a table with the columns Name, Description, Price and Category, and the buttons Add an item, Make it a content type, Delete the collection and Save

Number

Part

What it does

1

The collections

One line per collection and language. Choosing one opens it beside.

2

Columns

The names of the values each row has, as the collection was made. A page may show only some of them, in another order.

3

Long values

A column whose values are long, or of several lines, is written in boxes that grow.

4

Add an item

A new empty row at the end, its first box ready to write in.

5

Make it a content type

Only with the advanced options on (below).

6

Delete the collection

After asking, sends it to the trash in every language. Pages that still show it lose its rows and warn at the next build.

7

Save

Saves the whole table. Leaving a table with changes not saved asks first.

Images and the order of the rows

A wide table scrolls sideways. At the end of each row are its buttons.

The right end of the menu table: the Image column with a list of the site’s images on each row, the Favourite column, and on each row the buttons Move up, Move down and Remove

Number

Part

What it does

1

Image column

A column named for images (image, photo, picture), or whose values are all image files, offers the site’s images, or No image.

2

Move up, Move down, Remove

The order of the rows is the order the pages show them in, unless a page sorts them.

A new collection

The New collection dialog with the name Wines and the columns Name, Region, Glass and Bottle, one per line

Number

Part

What it does

1

Name

How the pages refer to it; it must be new on the site.

2

Columns

One per line, each with its own name. The rows are added after, in the table.

3

Done

Makes the collection, in every language of the site, and opens it.

Which components show a collection

Five components can take their rows from a collection instead of writing them: Cards, Table, Products, Dishes and Schedule. Each one names the collection in its source and reads the columns it knows, such as name, description, price and image. A few more options shape what it shows:

  • filter: only the rows with a value, such as category = Mains.
  • sort: the rows ordered by a column, from the last with a minus sign (-price).
  • limit: at most this many rows.
  • columns and labels (Table only): which columns to show, in which order, and their headings.

A source naming a collection the site does not have shows nothing and raises a warning; see Warnings.

A collection made into a content type

When a collection grows into entries that deserve their own page, such as each product, whoever builds the site can make it a content type: each column becomes a field, its type read from its values, and each row an item, in every language the collection has. The dialog asks for the type’s name, its label, its template and the page its items go under, or none for items without pages. The collection stays as it is; change the pages that show it once the items are ready.