[Typo3] Templavoila & DirectMail

Kraft Bernhard kraftb at gmx.net
Mon Jul 18 11:02:53 CEST 2005

Pierre Rouwens wrote:
> Hi there,
> I use Typo3 3.8 and templavoila, i m trying to configure DirectMail, but 
> in the plain text mode i have this error : CTYPE "" not defined!
> is DM compatible with templavoila or did i miss something ?
> Which code can i give you to help me ?
> Thanks a lot for any clues

TV isn't intended to generate DM newsletters but it will work ... HTML newsletters
are almost no problem and works as expected .... but with plaintext newsletters
theres a little trick you have to do...

You have to create a "sub-template" of the main TO (the newsletter TO) which you define
as print-version (see FTB for this). Use a HTML file which has "dummy" <html>, <head> and
<body> tags ... they will get cut away later ...
You will need one:
<div id="content"></div>
inside the plaintext template which you have to map OUTTER to your content-area (I assume you
have only one). OUTTER is important so the div get's also replaced ....

Then add the "alt static plaintext" template to your TS template.

The TS template for your newsletter should look like:
[globalVar = GP:print > 0]
# we use the plaintext rendering methods if we have a plaintext version ...
# so all our content elements have no tags but just good-old plaintext
tt_content < lib.alt_plaintext.renderObj

# Default PAGE object:
page = PAGE
page.typeNum = 0
page.10 = USER
page.10.userFunc = tx_templavoila_pi1->main_page

# if we have the plaintext version we cut away all <html> <head> and <body> stuff ...
[globalVar = GP:print > 0]
config.disableAllHeaderCode = 1

Then as last thing you have to change in your direct mail configuration that plaintext newsletters
are fetched by appending &print=1 to the URL (and not &type=99 as the default would be)

If you suceed and have the time it would be nice if you could write a wiki page about this procedure ...

Kraft Bernhard
MOKKA Medienagentur <http://www.mokka.at>
T: +43 - 1 - 895 33 33 - 50

More information about the TYPO3-english mailing list