2015-12-19 14:52:17 +01:00
|
|
|
title: Attachments
|
|
|
|
---
|
|
|
|
summary: Describes behavior of attachments for records.
|
|
|
|
---
|
|
|
|
body:
|
|
|
|
|
|
|
|
Each source can also have other files attached. Anything that is not
|
|
|
|
the main content file in a folder is considered to be an attachment.
|
|
|
|
There are a few settings to control these in the `[attachments]` section:
|
|
|
|
|
|
|
|
* `enabled`: if set to `no` then attachments are disabled. If they do
|
|
|
|
exist in the folder they are silently ignored.
|
|
|
|
* `model`: an optional default model that is used for all attachments.
|
|
|
|
* `order_by`: controls the ordering of attachments, similar to how this
|
|
|
|
works for child pages.
|
2022-07-27 18:01:03 +02:00
|
|
|
* `hidden`: if this is set, attachments will not be built.
|
|
|
|
(Note that any setting here may be overridden on a per attachment basis by
|
|
|
|
setting that attachment's [`_hidden` field](https://www.getlektor.com/docs/models/attachments/).)
|
2016-04-10 22:13:43 +02:00
|
|
|
|
|
|
|
!! The `hidden` flag was added in Lektor 2.0 and the default was changed so
|
|
|
|
that attachments are not hidden by default, even if the parent is.
|