Skip to content

Kirby 4.5.0

$page->template()

Returns the final template

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

Return type

Kirby\Template\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.