Hi,
I have a template var (TV) in an modx 0.9.6.3 installation (upgrade is no option at the moment) which put's out a small textarea.
The input is defined on many pages, so I don't like to overwrite it manually, and I would like to keep the TV's input to switch it back on later.
But for some time (marketing project for some weeks), I'd like to output another text instead, which I would like to define only once.
How could this be achieved?
I thought about writing a small snippet, which overwrites the TV, but don't know how.
But maybe this could be achieved easier?
Any help is greatly appreciated.
Cheers
Frisco
If the text is the same for every usage, you could write a plugin attached to OnParseDocument and just use str_replace to replace the TV tag with whatever you want.
I think this would do it (untested):
<?php
$content = $modx->resource->getContent();
$content = str_replace('[[*MyTv]]', 'Something Else', $content);
$modx->resource->setContent($content);