[Templates] TT equivilent to Mason autohandler

Perrin Harkins perrin at elem.com
Sat Apr 26 21:04:26 BST 2008


On Sat, Apr 26, 2008 at 9:19 AM, Andy Wardley <abw at wardley.org> wrote:
>  This is the bit that TT doesn't support.  You have to define a single PROCESS
>  template up front.  You can't just drop a new one in a directory like you can
>  with Mason.

You sort of can.  If you set the INCLUDE_PATH based on the request
(e.g. [ '/foo/bar', '/foo', '/' ] ), you get inheritance like Mason's
and can use WRAPPER or PROCESS with overring. What you don't get is an
equivalent to $m->call_next, so layering them would be tricky.
Overriding works very well though.

- Perrin



More information about the templates mailing list