[Catalyst] Re: How to access current MyApp instance ?
Perrin Harkins
perrin at elem.com
Thu Jul 5 21:46:35 GMT 2007
On 7/5/07, A. Pagaltzis <pagaltzis at gmx.de> wrote:
> That's what I was advising, basically, except that I would tell
> people to use INCLUDE instead of PROCESS.
>
> Else you'll be violating your own rule not to add variables to
> the stash from inside a template, as soon as any of your blocks
> are parametrisable.
I don't normally make blocks parameterizable. I treat them like dumb SSI.
> The question is whether this is intrinsic to templates or simply
> a consequence of the extensive limitations of the TT language.
I think it's intrinsic to templates. They lack the resources that a
real programming language has for managing complexity. I think the
only way around the need for simple templates would be to take a
widget-based approach where you don't directly write any HTML. The
Bivio guys made this work. It's not for everyone though. It takes
discipline.
My other motivation for simple templates is that I like to get other
people to write the HTML. They have to simple enough to hand to a
stranger without elaborate explanations.
- Perrin
More information about the Catalyst
mailing list