# This file defines the contenttypes on the website. See the documentation for # details: https://docs.bolt.cm/contenttypes/intro # Pages can be used for the more 'static' pages on your site. Things like # 'about us', 'contact' or a 'disclaimer'. This content-type has a 'templateselect' # field, which allows you to override the record_template setting for an # individual page. # The taxonomy for this contenttype is defined as 'groups', which is a so-called # "grouping taxonomy". This way you can easily group sets of pages that logically # belong together. If your site has a 'services' section, in which you'd like to # list the different types of services a company provides, you can group these # together. pages: name: Pages singular_name: Page fields: title: type: text class: large group: content slug: type: slug uses: title image: type: image teaser: type: html height: 150px body: type: html height: 300px template: type: templateselect filter: '*.twig' taxonomy: [ groups ] recordsperpage: 100 # Entries can be used for things like 'news' or 'blogpostings'. They have a 'teaser', # which can be used for a short blurb on listing-pages, allowing visitors to # click-through to the rest of the entry. It also has fields for an image and an # optional video. # A relation is defined to the pages contenttype. This way you can refer to a page # from your news-item. # This contenttype defines 'categories' and 'tags' as taxonomies, allowing the # editor to use both to categorize a specific entry. # The 'sort' is set to '-datepublish', which means that newer entries will be # shown above older entries. entries: name: Entries singular_name: Entry fields: title: type: text class: large group: content slug: type: slug uses: title teaser: type: html height: 150px body: type: html height: 300px image: type: image group: media video: type: video relations: pages: multiple: false order: title label: Select a page taxonomy: [ categories, tags ] record_template: entry.twig listing_template: listing.twig listing_records: 10 default_status: publish sort: -datepublish recordsperpage: 10 # The 'Showcases' is not particularly useful in most cases, but it does a good # job of showcasing most of the available fieldtypes. Feel free to delete it, or # copy some fields to your own contenttypes. # Since no templates are defined for this contenttype, the default record_template, # listing_template, and related settings are used from config.yml showcases: name: Showcases slug: showcases singular_name: Showcase singular_slug: showcase fields: title: type: text class: large required: true pattern: ".{2,255}" # see: http://html5pattern.com/ error: "The Title field is required, and must contain at least 2 characters" group: Text slug: type: slug uses: [ title ] html: type: html height: 150px textarea: type: textarea postfix: "

This is a plain text area. the contents will not be processed.

" markdown: type: markdown postfix: "

This field gets parsed as Markdown, when rendered on the site.

" geolocation: type: geolocation group: Media video: type: video image: type: image attrib: title # Note: retrieve this in your template with {{ record.values.image.title }} extensions: [ gif, jpg, png ] imagelist: type: imagelist file: type: file group: files filelist: type: filelist checkbox: type: checkbox label: "This is a checkbox" group: other datetime: type: datetime default: "2000-01-01" variant: inline date: type: date default: "first day of last month" variant: inline integerfield: type: integer index: true floatfield: type: float selectfield: type: select values: [ foo, bar, baz ] multiselect: type: select values: [ A-tuin, Donatello, Rafael, Leonardo, Michelangelo, Koopa, Squirtle ] multiple: true postfix: "Select your favourite turtle(s)." selectentry: type: select values: entries/id,title postfix: "Select an entry" autocomplete: true sort: title repeater: type: repeater group: repeater limit: 3 prefix: "

This allows you to create multiple sets of fields. Use the add button at the bottom to create a new empty set.

" fields: repeattitle: type: text repeatimage: type: image extensions: [ gif, jpg, png ] repeatcontent: type: html relations: entries: multiple: false label: "Choose an entry" order: -id format: "{{ item.title|escape }} (№ {{ item.id }})" postfix: "By selecting an Entry, you're creating a bi-directional relationship to that Entry." pages: multiple: true order: title label: Select zero or more pages taxonomy: [ categories, tags ] show_on_dashboard: true default_status: publish searchable: true icon_many: "fa:gift" icon_one: "fa:gift" # The 'Blocks' contenttype is a so-called 'resource contenttype'. This means # that it can be used to manage smaller pieces of content, like the 'about us' # text, an 'our address' in the footer, or similar short blurbs of text. # For more info, see: https://docs.bolt.cm/howto/resource-contenttype blocks: name: Blocks singular_name: Block fields: title: type: text class: large group: "Block" slug: type: slug uses: [ title ] content: type: html height: 150px contentlink: type: text label: Link placeholder: 'contenttype/slug or http://example.org/' postfix: "Use this to add a link for this Block. This could either be an 'internal' link like page/about, if you use a contenttype/slug combination. Otherwise use a proper URL, like `http://example.org`." image: type: image attrib: title extensions: [ gif, jpg, png ] show_on_dashboard: true viewless: true default_status: publish searchable: false icon_many: "fa:cubes" icon_one: "fa:cube" # Possible field types: # # text - varchar(256) - input type text. # integer - integer - Input field for integer numbers. # float - double - Input field for floating numbers, stored as 'Double'. # geolocation - text (65kb) - Input field for geolocation. Enter an address, and the location is geocoded to latitude/longitude coordinates # imagelist - text (65kb) - Input type for imagelists. Add multiple images with a description. Useful for image sliders, galleries, etcetera. # image - varchar(256) - image select/upload widget, stored as filename. # file - varchar(256) - file select/upload widget, stored as filename. # filelist - text (65kb) - Input type for a list of files. Including a description. # video - varchar(256) - Video embed widget, stored as filename. # html - text (65kb) - wysiwyg element. # textarea - varchar(32768) - Simple, plain < textarea > field. # markdown - varchar(32768) - Simple, plain < textarea > field, which is parsed as Markdown text. # datetime - datetime - date and time selector widget. # date - datetime - date selector widget. # select - varchar(256) - select with predefined values # templateselect - varchar(256) - select with template filenames # checkbox - integer - checkbox-field which is 1 (checked) or 0 (unchecked) # Using YAML repeated nodes # # YAML allows the defining of "repeated nodes". These allow you to define a 'node' # with a 'key: &name' and referenced later with '<<: *name' # # Bolt allows you to define this with the special entry of '__nodes:' that itself # won't create a Contenttype, but will allow you to use it in actual contenttypes # to prevent repeating yourself. # # To achieve this, first create a key '__nodes:' #__nodes: # field_defaults: &field_defaults # title: # type: text # class: large # group: main # slug: # type: slug # uses: title # template_defaults: &template_defaults # template: # type: templateselect # filter: '*.twig' # group: meta # # Then, as an example, you could create a Contenttype with default fields, with # an additional 'image' field. # #contenttype_abc: # name: Contenttype Abc # fields: # <<: *field_defaults # image: # type: image # attrib: title # extensions: [ gif, jpg, png ] # <<: *template_defaults # taxonomy: [ chapters ] # recordsperpage: 10 # # Alternatively, or additionally, you then can then create a Contenttype with # default fields, and a 'select' field, and a different 'templateselect' option. # #contenttype_xyz: # name: Contenttype Xyz # fields: # <<: *field_defaults # selectfield: # type: select # values: [ none, foo, bar ] # template: # type: templateselect # filter: '*_xyz.twig' # taxonomy: [ tags ] # recordsperpage: 20