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();

$ctx->variable_name;

You can also access TALES paths outside templates:

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

--
regards, Kornel

_______________________________________________
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal

Reply via email to