Data files are pieces of content that don’t belong to a specific page or piece of content. They are commonly used for managing content like social media handles and links, contact information, and branding (e.g, logo images and site colours).
Forestry allows you to edit existing data files. They can be found under Data in the sidebar.
You can also apply Front Matter Templates to your data files, allowing configuration of the fields that are displayed in the CMS. To do so, navigate to the Data File you want to customize:
- Click the settings button in the top right, next to the “Save” button
- Click “Change Template”
- Choose the Front Matter Template you want and click “Done”
In order to use Front Matter Templates with data files, you will need to place all of your fields inside of a Field Group with the same name as the name of your data file.
For example, if you want to create a FMT for a data file named
social.yml, you will need to place your fields in a Field Group with the name of
fields: - type: field_group name: social label: Social fields: - type: text name: twitter_url label: Twitter URL - type: text name: facebook_url label: Facebook URL
This will be improved in a future update.
Caught a mistake or want to contribute to the docs? Edit this page on Github!