Templates exist as an alternative to the fields type when multiple variants of the same collection or object.
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],},],},],},})
© TinaCMS 2019–2025