Skip to content

Kirby 3.5.7.1

$page->index()

Creates a flat child index

$page->index(bool $drafts = false): Kirby\Cms\Pages

Parameters

Name Type Default
$drafts bool false

Return type

Kirby\Cms\Pages

Parent class

Kirby\Cms\Page

Example

// goes through any subpage, subsubpage, etc. below $page and returns them by template
$articles = $page->index()->filterBy('template', 'article');

// the index method is also perfect for searching
$results = $page->index()->search('mysearchword');