include_undiscoverable (value)

  • Method of Query
  • New in Lektor Version 2.0

This controls how the query should behave with regards to undiscoverable records. A query (either created from the children attribute or the query method of the pad) will not include undiscoverable records by default.

If undiscoverable records should included this method needs to be used. Set it to True to include hidden or False to exclude them (default).

Example

Here a basic example of how to filter something in a template:

<ul>
{% for item in this.children.include_undiscoverable(true) %}
  <li>{{ item.title }}</li>
{% endfor %}
</ul>

Comments