Added documentation for hidden/pagination.items

This commit is contained in:
Armin Ronacher 2016-04-10 22:13:43 +02:00
parent d1ed5b1973
commit 8bb2606192
2 changed files with 17 additions and 0 deletions

View File

@ -13,3 +13,9 @@ There are a few settings to control these in the `[attachments]` section:
* `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.
* `hidden`: if this is set it can override the hidden flag for all
attachments at once. The default as of Lektor 2 is that attachments are
not hidden by default.
!! 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.

View File

@ -37,6 +37,12 @@ Here are the most important options below `[children]`:
when it really has not. This can be a query expression and the result
is then used as the children of the model. This for instance can be
used to implement categories with filtering.
- `hidden`: if this is set it can override the parent's hidden flag for
all children. This is particularly useful if you want to have a folder
for error pages or other special pages where the parent itself should not
be rendered but all children are. The default is not set.
!! The `hidden` flag was added in Lektor 2.0
## Child Slug Behavior
@ -79,8 +85,13 @@ keys are available:
* `per_page`: this controls how many children are shown per page. If
pagination is enabled and this is not set, an implicit default of `20`
is assumed.
* `items`: if this is set to a query then the pagination's items will be
overridden by it. This can be used to make the pagination work over a
subset of items.
If pagination is enabled then the [pagination attribute
:ref](../../api/db/record/pagination/) of a record becomes available. For
more information have a look at the [pagination guide
:ref](../../guides/pagination/).
!! The `items` property was added in Lektor 2.0