pages()
Helper to build page collections
Parameters
Name | Type | Default |
---|---|---|
$id | string |array |
null |
Return type
Kirby\Cms\Page
|Kirby\Cms\Pages
|null
The pages()
helper throws a deprecation warning if a single ID gets passed. Starting in 3.7.0 it will always return a Kirby\Cms\Pages
collection. Use page()
for a single page instead.
Example
The pages()
helper fetches published pages only; ids of draft pages are ignored.