Headless Documents
A Headless Document is a Pimcore document, of type headlessdocument, that always uses the same built-in Twig
template. Instead of a developer writing a custom template per document, the
template configuration selected in its settings decides which editables it
holds and how they are arranged. There is no Twig template to write for a new Headless Document type, only a YAML
configuration.
Once a template configuration is ready, add a Headless Document like any other document, by selecting the Headless Document template in the document tree context menu:
Editing a Headless Document works the same way as editing any other document in Pimcore Studio: fill in the editables defined by its template.
Change Template
The Settings tab of a Headless Document lets you change its template after creation.
Switching the template hides content. Editables that exist under the old template but not under the new one stop being rendered in Pimcore Studio and are omitted from the Datahub response, because the response is filtered against the active template configuration. Their stored values are not deleted at the moment of the switch, but they are dropped from the database the next time the document is saved.
Next Steps
The built-in template that a Headless Document renders is a plain content-management view: each editable with its label, not a designed page. Build the actual frontend by querying the document's data through Datahub, see Datahub Integration.


