owebstudio / kirby-plates
Plates native PHP template engine/system for Kirby.
Package info
github.com/owebstudio/kirby-plates
Type:kirby-plugin
pkg:composer/owebstudio/kirby-plates
Requires
- php: ^7.4|^8.0
- getkirby/composer-installer: ^1.2
- league/plates: ^3.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
- getkirby/cms: >=6.0
Replaces
None
This package is auto-updated.
Last update: 2026-10-30 20:59:54 UTC
README
Kirby Plates
Note
This plugin is in maintenance mode and only gets security fixes. It supports Kirby 3, 4 and 5. It does not support Kirby 6.
Since Kirby 3.9, Kirby's own snippets with slots and layout snippets cover most of what Plates layouts and sections do. Kirby 6 adds the push() and stack() helpers for things like scripts and styles.
This package enable Plates that Native PHP template engine/system for your own Kirby applications.
All the documentation about Plates template engine is in the official documentation.
Installation
The download and the Git submodule include Plates 3.6, which needs PHP 8.0 or newer. Composer installs the Plates version that fits your PHP version.
Installation with composer
Manual
- Download the latest release
- Unzip downloaded file
- Copy/paste unzipped folder in your
/site/pluginsfolder
With composer
composer require owebstudio/kirby-plates
Git submodule
git submodule add https://github.com/owebstudio/kirby-plates.git site/plugins/kirby-plates
Sample usage
/site/templates/home.php
<?php $this->layout('default') ?> <h1>User Profile</h1> <p>Hello, <?=$this->e($name)?></p> <?php $this->push('scripts') ?> <script src="example.js"></script> <?php $this->end() ?>
/site/templates/layouts/default.php
<html>
<head>
<title><?=$this->e($title)?></title>
</head>
<body>
<?=$this->section('content')?>
<?= $this->section('scripts') ?>
</body>
</html>
