page()
Fetches a single page or multiple pages by id or the current page when no id is specified
Parameters
Name | Type | Default |
---|---|---|
$id | string |array |
null |
Return type
Kirby\Cms\Page
|null
Example
Fetching a specific page by URI
Fetching the current page
The page()
helper fetches published pages only. To fetch a draft, you have to use $kirby->page('somepage')
.