On Fri, 25 Feb 2005, Denis Banovic wrote:

> Yes, that's correct, I'm looking for a way to convert (some parts of )
> TT ( eg. [ FOREACH and IF ] ) to PHP. Our PHP templates are very similar
> to TT-Templates,

How about doing it the other way and processing the PHP in Perl ?

http://search.cpan.org/~karasik/PHP-0.03/PHP.pm

I'm sure it would not be too hard to write a TT Plugin to evaluate php
tags in the headers and footers using this module although I'm not sure
I'd want to make production code out of it.

Another approach may be to write a php grammar using Parse::RecDescent and
use it to either turn the templates into TT code for execution in the TT
engine, or just to process the php tags directly.

Simon.

-- 
"Hod-d-d-d-d-d"


_______________________________________________
templates mailing list
[email protected]
http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to