We use cookies to improve your experience. By continuing, you agree to our use of cookies. Learn More
In most cases, just using fields
is enough, however templates can be used when there are 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".
Property | Description |
---|---|
| The name of the template |
| A human friendly label that will be displayed to the user |
| Changes the component to inline styling |
| An array of fields |
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