zigit-dev/textformatter_tokens 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

  1. Enable the TextformatterTokens module.
  2. Enable the SiteTokens module.
  3. Enable the TextformatterTokens text 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] where id is 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

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-07-11