BoltCM

Sophisticated, Lightweight and Simple

Jump to docs navigation
Edit on GitHub

Field types » Templateselect field

Allows setting a template to use when rendering a specific record. Will allow the record creator to specify any template in the root folder of the current theme with a file name that does not begin with an underscore. If a specific template is not chosen in the record editor, the record will be rendered with the default template for that ContentType. If a templateselect field is used in a repeater or in templatefields it will not affect which template Bolt uses to render the record, but can still be used by the theme developer in the theme.

Basic Configuration:

        template:
            type: templateselect

Example usage in templates:

{{ record.template }}

Options:

The field has a few options to change the functionality of the field.

        template:
            type: templateselect
            filter: 'pages*.twig'

Couldn't find what you were looking for? We are happy to help you in the forum, on Slack or on IRC.
Spotted a typo, or have something to add? Edit this page on GitHub.