Skip to content

Kirby 3.8.2

$page->template()

Returns the final template

$page->template(): Kirby\Cms\Template

Return type

Kirby\Cms\Template

Parent class

Kirby\Cms\Page

Example

<?= $page->template() ?>

This returns the actually used template, which may differ from the blueprint name of a content page (e.g. when no corresponding template exists for blueprint article, and template default is used instead). Use $page->intendedTemplate() to return the template originally defined for a page.