Skip to main content
A datatype is one record type (for example News or Event). It lists which fields belong to that type. The datatype is the blueprint of a record type. It decides which fields appear in the record form and in which order, how records look in the backend lists, and it owns the database table and the PHP class that hold and load the records. Editors never edit the datatype; they create records of the datatype.

Create a datatype

  1. Open your storage folder in Records.
  2. Create new record → tonictypes → Datatype.
  3. Set Name (and optional description).
  4. Open Fields and assign the fields (order = form order).
  5. Save, then click Create Table / Update Table.
  6. Click Create Class / Update Class.
  7. Still on this folder: Create new → your datatype name → add records.
General tab of a Datatype General — name, table, and class status

What Create Table and Create Class do

The General tab checks whether the database table and the PHP class still match the assigned fields and shows the matching button. Run Update Table and then Update Class every time you add, remove or change fields of a datatype, and clear the caches afterwards.

Tabs overview

Appearance (common options)

  • Icon / Color — how records of this type are recognised in the backend
  • Title Divider Character — separator used when several fields form the record title (fields marked Use as record title on the field)
  • Thumbnail Field — list thumbnail; pick an image field so editors recognise records at a glance
  • Hide Records of this type in lists / Hide Button to Add new Record — keep records out of the List module or stop editors from creating new ones there (for example when records are created by an import)
  • Enable SEO Fields — SEO fields on the record form, for types that get their own detail page
  • New records are disabled by default — new records start hidden (default_hidden, Core 2.1+); an editor must enable them, which suits a review step before publishing

Advanced Settings

  • Cache generated TCA — cache TCA; clear caches after structural changes
When this is on (the default), Tonictypes caches the complete generated TCA of the datatype and of all its fields. This keeps the backend fast. Turn it off only while you are changing fields a lot and do not want to clear caches after each change.

Move structures to another site

Use free Core System > Export / Import: Import / Export.

Next

Template variables · Templating · Frontend Plugins