Records and files
Creating new records follows a default scheme. A table is defined as a property type on the root level and contains an array of records. Properties for each record can be added using the database column names.
Note
It is recommended to use a unique identifier for each record.
Allowed characters in identifiers are
a-,
A-,
0-,
-
and
_
.
pages:
- identifier: home
pid: "{pages:root}"
sorting: 100
doktype: 1
title: Home
# Slugs are generated automatically for pages
is_siteroot: 1
tt_content:
- identifier: example
pid: "{pages:home}"
CType: heaader
header: My example content
header_layout: 1
Files
Defining files is a special case. All files are added to the defined storage using FAL method including meta data extractors.
sys_file:
- identifier: example_jpg
source: 'data/files/example.jpg'
storage: default
folder: placeholder/
| Name | Type | Required |
|---|---|---|
| string | true | |
| string | true | |
| string | true | |
| string | true |
identifier
-
- Type
- string
- Required
true
A unique identifier for this file.
source
-
- Type
- string
- Required
true
Path to the file relative to project root or with
EXT:prefix.
storage
-
- Type
- string
- Required
true
The identifier for the storage that should be used. See FAL storage options.
folder
-
- Type
- string
- Required
true
The target directory where the file is copied. Relative to storage base path. Directory is created if is does not exist.