zigit-dev/textformatter_tokens
最新稳定版本:1.0.1
Composer 安装命令:
composer require zigit-dev/textformatter_tokens
包简介
Allows other modules to register tokens and replace them with actual values.
README 文档
README
Overview
The TextformatterTokens module allows other modules to register tokens and replace them with actual values.
Installation
- Enable the
TextformatterTokensmodule. - Enable the
SiteTokensmodule. - Enable the
TextformatterTokenstext formatter for a field.
Usage
Use tokens provided by the SiteTokens module inside a field that has the TextformatterTokens text formatter enabled.
Save and display your page. The tokens should be replaced with the actual content.
Example Tokens
[site:name][page id=123]whereidis the ID of the page you want to embed its body field.
Debugging
You can view logs under your ProcessWire admin dashboard at Setup > Logs > tokens.
Writing own tokens
To create custom tokens, refer to the SiteTokens.module file for an example implementation.
统计信息
- 总下载量: 10
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-07-11