Checklist
Remember: configuration and records → Records module. Plugins → Page module.
Worked example: a “Demo Article” record type
This example builds a small article type with a title, a subtitle and a description, and lists the articles on a page. The screenshots in this documentation were taken from exactly this setup.- Create a storage folder. In the page tree add a page of type Folder, for example “Tonictypes Demo”. Everything below (fields, datatype, records) goes into this folder.
-
Create three fields. In the Records module on that folder: Create new record → Field.
- Type Input Field, Frontend Label
Title - Type Input Field, Frontend Label
Subtitle - Type Textarea, Frontend Label
Description
title,subtitle,description). It also becomes the database column name. - Type Input Field, Frontend Label
-
Create the datatype. Create new record → Datatype, Name
Demo Article. On the Fields tab move the three fields to the selected side in the order they should appear in the form. Save. -
Generate table and class. Click Create Table, then Create Class (after later changes the buttons read Update Table / Update Class). Tonictypes now creates the table
tx_tonictypes_domain_model_record_demo_articleand the PHP classDemo/Article.php. Clear all caches. - Create records. Still on the folder: Create new record → Demo Article. Add “First Demo Article” and “Second Demo Article”.
- Show them on a page. Open a normal page in the Page module → New content element → Tonictypes → Record List. Set Datatype = Demo Article, Startingpoint = the storage folder, template = Debug Template. Save and view the page.
Minimum plugin settings
After you insert a plugin, set:- Datatype — tells the plugin which record class and table to query
- Startingpoint (the storage folder) — tells it where the records are stored
- Template (start with the debug template if unsure) — tells it how to render them
Shortcuts
- Sample datatype: dashboard Predefined Datatype Import widget (details) — imports a bundled, ready-made datatype into a storage folder you choose, useful to explore a working setup
- Copy structures between sites: Import / Export