On Sun, 24 Feb 2002, Phil Taylor wrote:

> I can't work out a clean way of doing this other than creating two
> HTML::Template objects and pushing the $subTemplate->output() into a
> $masterTemplate->param(....). Is there a better way of achieving this?

That should work fine.  You might also consider breaking-up the
surrounding stuff into a top.tmpl and a bottom.tmpl that you could pull in
with <tmpl_include>.  That's the solution I've most-often used and it
seems to match well with designers existing SSI-based expectations.

> I came round to thinking that the ideal would be to have the param
> method accept a template as a parameter value.

You mean supporting:

  $outer->param(inner => $inner);

As syntactic sugar for:

  $outer->param(inner => $inner->output);

?  It seems like a lot of work just to save you 8 characters!  Also, the
longer form is much clearer about what's actually happening.

-sam


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to