2015-12-25 22:53:37 +01:00
|
|
|
title: _hidden
|
|
|
|
---
|
|
|
|
summary: Controls if the page should be built or not.
|
|
|
|
---
|
|
|
|
type: sysfield
|
|
|
|
---
|
|
|
|
body:
|
|
|
|
|
|
|
|
This field controls if Lektor should process the page into a build artifact.
|
2022-07-27 18:01:03 +02:00
|
|
|
By default, each page is built into a build artifact (HTML page) and each
|
|
|
|
attachment is copied to the output directory.
|
|
|
|
This can be prevented for a particular page or attachment by setting its `_hidden` to `yes`.
|
2015-12-25 22:53:37 +01:00
|
|
|
|
2022-07-27 18:01:03 +02:00
|
|
|
If an explicit value for the `_hidden` field is not set, the value of the `hidden` option in the
|
|
|
|
[child configuration] — or, for attachments, [attachment configuration] — section
|
|
|
|
of the parent's datamodel is checked.
|
|
|
|
If that, too, is not set, then pages, but not attachments, inherit the hidden status of their parent —
|
|
|
|
that is, by default, children of hidden pages will not be built, though attachments of hidden pages will.
|
|
|
|
|
|
|
|
[child configuration]: https://www.getlektor.com/docs/models/children/#child-configuration (The [children] section of the datamodel)
|
|
|
|
[attachment configuration]: https://www.getlektor.com/docs/models/attachments/ (The [attachments] section of the datamodel)
|
2015-12-25 22:53:37 +01:00
|
|
|
|
|
|
|
This is useful for more advanced setups like [Single Page Applications
|
|
|
|
:ref](../../../../guides/single-page/).
|
|
|
|
|
|
|
|
Hidden pages are automatically also removed from the `.children` property
|
|
|
|
of records but stay available for querying via the pad.
|