On Sep 27, 2009, at 22:43, Jens Schwarz wrote:
> I am working on a Catalyst application where most of the actions
> should use a wrapper template as mentioned in [1]. Now I have some
> few actions that should explicit NOT use the wrapper.
Depends a little on who knows if the wrapper should be used. (Unless
I misunderstood the question).
If the template itself knows when it wants the wrapper or not, you
could just have it set a variable so the wrapper will make itself a no-
op when appropriate. An example of how we do it is below. The
template can set 'page.style' to 'none' to basically skip the wrapper.
- ask
[%- content = PROCESS $template;
#USE Dumper; Dumper.dump_html(page template)
IF page.style == 'none';
content;
ELSE;
default_style_template = "tpl/style/" _ page.style;
PROCESS $default_style_template;
END;
%]
_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates