afbora/kirby-template-hooks
Composer 安装命令:
composer require afbora/kirby-template-hooks
包简介
Enable page and file template hooks for Kirby 3
README 文档
README
Kirby template hooks allow you to manage hooks for page and file templates more easily.
Installation
Installation with composer
composer require afbora/kirby-template-hooks
Add as git submodule
git submodule add https://github.com/afbora/kirby-template-hooks.git site/plugins/kirby-template-hooks
Usage
Pages
Usage: page.TEMPLATE_NAME.ACTION_NAME:before/after
<?php return [ 'hooks' => [ 'page.product.update:after' => function ($newPage, $oldPage) { // your code goes here } ] ];
Files
Usage: file.TEMPLATE_NAME.ACTION_NAME:before/after
<?php return [ 'hooks' => [ 'file.cover.update:after' => function ($newFile, $oldFile) { // your code goes here } ] ];
统计信息
- 总下载量: 616
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 15
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-08-06