TYPO3: Replace RTE content through TypoScript
Ever wanted to replace a single word throughout a whole TYPO3 website? Of even better: You know it will have to be changed in time? Like a year or a name? The solution is quite simple yet not seen as often as you might think. Most people know they can set a TypoScript constant to easily change a TypoScript setup value along the way, but your actual content is most of the time written in the RTE. With this little TypoScript snippet you can replace RTE content with something else.
Example 1: We want our customers to contact us by phone, but the phone number changes all the time.
RTE content:
Please call us: phonenumber
In TypoScript:
page {
stdWrap.parseFunc.short {
phonenumber = + 1 555-3141
}
}
In the frontend ‘phonenumber’ will now be replaced with the actual number. Quite easy. Combined with TypoScript conditions, this is a really powerful way of content rendering.
Example 2: We want customers to call a different phone number during business hours.
RTE content:
Please call us: phonenumber
In TypoScript:
[hour =< 9] && [hour =>18]
page {
stdWrap.parseFunc.short {
phonenumber = + 1 555-3141
}
}
[else]
page {
stdWrap.parseFunc.short {
phonenumber = + 1 555-5131
}
}
[end]

I didn’t test it since 4.3 > but it used to work: http://typo3.org/extensions/repository/view/de_custom_tags/current/
This extension use parseFunc but give editor access to a nice interface from RTE…
Gotta test it…
Hi Patrick,
Looks like an interesting extension, I will test it soon.