Hello,

> From: Octavian Rasnita <[EMAIL PROTECTED]>
> 
> Ok, in TT you can work using other's templating systems
> styles, including "PHP style".

This won't help because it only changes the style of TAGs,
but not the syntax of the templating mini language, unless 
I'm missing something.

> From: "Denis Banovic" <[EMAIL PROTECTED]>
> 
> The problem is, I need it to work in PERL and in PHP! And
> it would be great if I could use the my TT-Syntax

One way would be to write a transformation tool that munges
your TT templates into Smarty Templates. But this will not
be an easy task and you have to be aware that Smarty is
nowhere near as feature rich as TT so you'd have to limit
the features you are using in TT.

However, I think that you probably do not necessarily need
all of your templates available in both languages, only a
small subset of them, for example WRAPPERs. In these files
you might be able to simply use both templating languages
and strip the unwanted out in a preprocessor of each
template run. For example

   Hello [% $customer.name %]<+ $customer->name +>!

(Tip: for Smarty, use different TAGs than Smarty's default
tags {..} because they always conflict with JS, I'm using
<+..+> in this example)

Now when you use the template with TT you strip out all
<+..+> before processing and likewise, if you use Smarty
strip out the TT tags.

Good luck,
Hans

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

Reply via email to