/k3-pagesdisplay-section

K3 plugin: display any page list in a section. Any parent, many parents, filtered, don't care.

Primary LanguagePHPOtherNOASSERTION

Display any page list in a Section. Any parent, many parents, filtered, don't care.
On the other hand, you won't be able to sort the list or add new pages to it.

Install

Download Zip file

Copy plugin folder into site/plugins

Composer

Run composer require rasteiner/k3-pagesdisplay-section.

Usage

You select and filter the pages with the query language, with a query property in the section yaml. You can start the query with site, page (refers to the current page), pages (which is equal to site.pages), or kirby (mainly to use kirby.collection).

Example

Show all pages that have "Foo" in their title:

sections:
  mysection:
    headline: Foo Pages
    type: pagesdisplay
    query: site.index.filterBy(title, *=, Foo)

Show sibling pages (exclude current page):

sections:
  mysection:
    headline: Siblings
    type: pagesdisplay
    query: page.siblings(false)