How to suppress token replacement only once

Created on 29 October 2024, 24 days ago

Hello,
In one of my pages I would like to explain how tokens are being used in Drupal.
I have the token module and token filter module enabled and token replacement works.
If I for example use [node:date] then it is replaced with the date.

But I would like to show the litteral token [node:date] in my text without it being replaced.
Is there a way to prevent only one occurence of a token not to be filtered?

Hope someone can help,
Greetings,
Rob

💬 Support request
Status

Active

Version

2.2

Component

Documentation

Created by

🇳🇱Netherlands RobBNL

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @RobBNL
  • 🇦🇺Australia darvanen Sydney, Australia

    I thought I had commented here but I must not have submitted it, so, apologies for the delay.

    Turning off token replacement for a single token is a pretty extreme edge case so it's not something that is going to get into the module.

    It sounds like you're trying to test if the token is in the raw user input by seeing it on the page? If that is the case I would suggest disabling the filter in your chosen text format for that part of the test.

    I'm no testing guru, I think you'll find more support for that kind of thing on Drupal Slack, possibly in the #testing channel :)

Production build 0.71.5 2024