Reference

Guide

page()

Fetches a single page or multiple pages by id or the current page when no id is specified

page(string|array $id = null): Page|null

Parameters

Name Type Default Description
$id string|array null

Return type

Page|null

Example

Fetching a specific page by URI

<?= page('blog')->title() ?>

Fetching the current page

<?= page()->title() ?>

Source code

kirby/config/helpers.php#L532