TextformatterTokens by zigit-dev

Allows other modules to register tokens and replace them with actual values.

TextformatterTokens Module

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.

Install and use modules at your own risk. Always have a site and database backup before installing new modules.

Latest news

  • ProcessWire Weekly #561
    In the 561st issue of ProcessWire Weekly we're going to check out the latest core updates, share recent support forum highlights and online resources, and more. Read on!
    Weekly.pw / 8 February 2025
  • ProcessWire 3.0.244 new main/master version
    ProcessWire 3.0.244 is our newest main/master/stable version. It's been more than a year in the making and is packed with tons of new features, issue fixes, optimizations and more. This post covers all the details.
    Blog / 18 January 2025
  • Subscribe to weekly ProcessWire news

“The end client and designer love the ease at which they can update the website. Training beyond how to log in wasn’t even necessary since ProcessWire’s default interface is straightforward.” —Jonathan Lahijani