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.