Sample Template


This is a sample of using Templates in tinyRTE. This can also be an php-script and you can define any replacements in TS-Config
Usage
Put this little Typoscript in as value of TS-Config on a Page:

The path in RTE.default.templates.path should be the path to the Extension. "typo3conf/ext/tinyrte/" if the Extension is as local installed, "typo3/ext/tinyrte/" if the Extension is as global installed. In this case we defined two items, one Template called "Template" and one Snippet called "Snippet". We need a source for both (src=) and maybe a description. The source can be HTML or PHP or whatever.
We also define a path to our sources, in this case to the tinyRTE-Extension-Samples:

RTE.default.templates.path=typo3conf/ext/tinyrte/

We define some relacements, that can be placeholders for values of the actual user. In the source you notice {$username} as placeholder to replace. In TS-Config you can define which value should override this placeholder:

username=realName

realName is a field from the database and holds the real Name of the actual User, not the Username.

You see here in this Template a headline, this little text of usage and the textbox with Typoscript. Further you see a blue Box with a little Text. Only this will be inserted in the RTE, because itīs in a div-Container with a defined Classname "mceTmpl".

Only this Text in the blue Box would be inserted in the RTE.

Your name: {$username}
Your eMail: {$email}
Today is: 2025-5-14