query (path=None, alt='_primary')

  • Method of Pad

This is one of the many ways to create a Query object in Lektor. It creates a query at a specific path and alt. This is an alternative to accessing the children of the root record and will also include hidden pages.


{% for project in site.query('/projects') %}
  <li>{{ project.name }}: {{ project.year }}</li>
{% endfor %}