Templates allow you to define multiple structured variants within a single collection or object. They’re ideal when you need different data shapes under the same parent.
For example in a "page" collection there might be a need for a marketing page template and a content page template, both under the collection "page".
The name of the template.
An array of fields.
The template name as shown in the editor.
All properties marked as REQUIRED must be specified for the field to work properly.
export default defineConfig({//...schema: {collections: [{name: 'page',label: 'A page of the website',path: 'content/pages',format: 'mdx',templates: [{name: 'content',label: 'Content Page',fields: [// ... content page fields],},{name: 'marketing',label: 'Marketing Page',inline: true,fields: [//... marketing page fields],},],},],},})
Tina uses folder names matching the template to organize files correctly, e.g.:
/content/pages/marketing/home.md/content/pages/content/about.md