Skip to content
This repository has been archived by the owner on Nov 23, 2024. It is now read-only.

Setup: Template Component

Bruno Meilick edited this page Sep 20, 2020 · 3 revisions

You can can have handlebars and php templates in your /site/templates folder. The plugin will be used as template component for all files with hbs extension and default back to Kirbys core template component for the ones written in php.

Settings

bnomei.handlebars. Default Description
component true if false no templating will be handled by this plugin and you need to use the hbs()/handlebars() functions.
compile-flags callback Among other sensible defaults data sent to template will NOT be escaped. This way your templates can render data formated as html. You can use Kirbys Field Methods $field->kirbytext(), $field->html() or the Kirby\Toolkit\Str-Class functions to escape your text properly.
dir-templates callback returning kirby()->roots()->templates()
dir-partials callback returning kirby()->roots()->templates().'/partials'
extension-input hbs
extension-output lnc hbs compiled to php
Clone this wiki locally