On 08-09-2009 at 15:37:04 GRolf <ger...@pictureparking.com> wrote:

I use the PHPTal-templates also to fetch the (text) content of mails.

Is there a way to get the plain-text version of a template? I'd like
it to have the exact spacing & indention...

I would have expected to find a "plain-text" as setOutputMode()-param,
but this doesn't exist ?

PHPTAL intentionally doesn't support plaintext output. For plaintext you don't need automatic escaping and syntax checking (those are strengths of PHPTAL), but you need precise control of whitespace (which is a weak spot of XML).

For plaintext emails I recommend raw PHP.

If you want to reuse variables from PHPTAL object in e-mails, then use:

$ctx = $phptal->getContext();


You can also access TALES paths outside templates:

phptal_path($ctx, "path/to/variable");

regards, Kornel

PHPTAL mailing list

Reply via email to