From 8bb2606192b2f06dc702815f4c3b8e47b1a43eb1 Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Sun, 10 Apr 2016 22:13:43 +0200 Subject: [PATCH] Added documentation for hidden/pagination.items --- content/docs/models/attachments/contents.lr | 6 ++++++ content/docs/models/children/contents.lr | 11 +++++++++++ 2 files changed, 17 insertions(+) diff --git a/content/docs/models/attachments/contents.lr b/content/docs/models/attachments/contents.lr index 6cc093ce..31fec50e 100644 --- a/content/docs/models/attachments/contents.lr +++ b/content/docs/models/attachments/contents.lr @@ -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. diff --git a/content/docs/models/children/contents.lr b/content/docs/models/children/contents.lr index d33a70ab..73cd4239 100644 --- a/content/docs/models/children/contents.lr +++ b/content/docs/models/children/contents.lr @@ -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