Michael gave a great example of how to use TT to wrap a template with a
"layout".
I'm starting to explore TT today and have a couple questions on using it
with C:A.
1) Is there a good C:A + TT tutorial or cookbook example?
I looked at the TT tutorials, but I didn't find a C:A integration
example. Michael's example of loading the TT template is simple (I
probably just need to include the pkg, and use the code he gave
below)... but I'm paranoid and perhaps it really isn't that easy and
there are other things to consider. :-)
2) Should I use Any::Template ... or just go C:A + TT?
2a) If I do, how do I pass in the "WRAPPER" param?
3) C:A seems more active than ever! (especially all the cool new
plugins!) -- and with the Magic Dot pkg, HT also seems relatively active
whereas TT is has been at "3.x coming soon" for a long while. Is there
any chance that similar "WRAPPER" and "SET" functionality might be
easily hacked into HT?
Thanks folks!
Timo
> With TT you can do it in a couple of ways. I like WRAPPER myself. You
> create a wrapper template which just has a [% content %] var. And then
> in your gooey center template can set the title.
>
> So something like this:
>
> wrapper.tmpl
>
> <html>
> <head><title>[% page_title %]</title></head>
> <body>[% content %]></body>
> </html>
>
> gooey.tmpl
>
> [% SET page_title = 'Gooey Center' %]
> ...
>
> Your perl code:
> my $template = Template->new(
> WRAPPER => 'wrapper.tmpl',
> ...
> );
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/suppressed/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.