Each layout needs a special configuration file. The configuration file is a simple yaml-file that starts with some basic information. The information will be displayed next to the preview image of the layout:
Name: Typemill Copyright: Sebastian Schürmanns, trendschau Licence: Creative Commons BY 3.0 Link: https://trendschau.net Sizes: A5 (148mm 210mm) Photo: Photo by Markus Winkler on Unsplash
Nothing complicated here. You can also add other definitions and everything is optional, only the Name is mandatory.
In the next section of the yaml-file you can define which standard-forms you want to display. The definitions start with the keyword "standardforms". Everything is pretty semantic and you can simply experiment with the definitions a bit to understand which standard-forms are defined:
standardforms: coverbackground: true toc: true hyphens: true endnotes: true titlepage: true imprint: true dedication: true blurb: true generalsettings: originalheadlinelevels: true originalimages: true
All standardforms will be rendered automatically as soon as the user selects your layout.
In the third section you can define individual forms. You can use all kind of forms that are supported by the form-builder of Typemill. These individual forms start with the keyword "customforms". Look at this example:
customforms: fields: myfield: type: text label: Add some text yourfield: type: customfields label: Add some text
These forms will appear in the first tab "general" at the end of the page. The custom forms will be wrapped in a fieldset called "additional settings".
You can use the input of all forms in the twig template later.