Search code examples
stringdrupal-7

Correct way to override content being displayed?


I want to enable the use of codes inside of content on a Drupal website. For example, when creating a block or a node, i want users to be able to insert code like this:

[[EMAIL]]

Depending on what the current language is, it might display a different value. The tricky part is not retrieving the value I want to replace it with, but figuring out at what point I replace it?

What hook or function would I use, to replace any node content that has the specific code in it, with another value? And the same for a block or any other content that is going to be displayed?


Solution

  • I solved this by creating my own input filter. I copied this example.