Quilzomanual

Content types and records

A type says which fields a page must have, and every surface checks it.

In the adminTypesData

A type is a flat list of fields. Bind a page or a collection to it and every write must satisfy it, from the admin, the command line, the API and the agent interface, with no way to write around it.

Define a type and bind pages to it

The Types screen with the demo shop's product type and the pages bound to it
Types, and what must satisfy them.
quilzo type example > product.json   # a definition you can edit
quilzo type add product.json
quilzo type bind PAGE product
quilzo type check                     # validate every bound page

A field is one of these kinds: a line of text, a body of text, a number, yes or no, a date, a time of day, a web address, an email address, a page link, one choice from a list, a list of short entries, or the name of another page. Each is checked as its kind, and the editor asks for it with the right control: a date picker for a date, a time picker for a time, the choices for a choice.

Keep records in collections

The Data screen listing the products collection
Collections of records.
ToRun
List collectionsquilzo records collections
Queryquilzo records list products --where availability=low_stock
Add onequilzo records add products field=value
Import many in one commit, from a CSV, a JSON list or a calendarquilzo records import products rows.json
Export every record as a spreadsheetquilzo records export products -o products.csv
Require a typequilzo type bind-collection products product
Let somebody work on one collectionquilzo auth grant tech author --on /@data/samples

Every CSV Quilzo writes, the records export, the newsletter's list and the form exports alike, goes through one guard against spreadsheet formulas: a value that begins like one is written so the spreadsheet that opens it does not run it, and importing the file again reads it back as it was. Importing many items with the same title, from a spreadsheet or a WordPress export, numbers them from their shared name: same, same-2, same-3.

Who may read and write a collection

Each collection is checked as itself, at /@data/NAME; /@data is every collection. A role on the whole site covers them all. A role on a section of pages covers none, even a section with the same name as a collection: author on /samples writes pages under /samples, and author on /@data/samples writes the samples. The Data screen, quilzo records, the agent interface and the content API all ask the same question, so somebody granted one collection sees that one and is not told the others exist.

Next