[Catalyst] :Template() Attribute
Zbigniew Lukasiak
zzbbyy at gmail.com
Mon Jun 18 16:25:39 GMT 2007
On 6/18/07, Matt S Trout <dbix-class at trout.me.uk> wrote:
> > What I would propose is something like:
> >
> > my $template = $c->action->namespace . '/';
> > $template .= $c->stash->{template} || $c->action->name;
> > $template .= self->config->{TEMPLATE_EXTENSION};
> >
> > But the template inheritance that I describe in the other letter in
> > this thread might be even better.
>
> You can do this via additional_template_paths.
>
> What you just proposed is woefully incompatible with every single deployed
> application so not remotely an option.
True - here is the corrected version:
$c->stash( additional_template_paths => $c->action->namespace );
my $template = $c->stash->{template} || $c->action->name .
$self->config->{TEMPLATE_EXTENSION};
--
Zbigniew Lukasiak
http://brudnopis.blogspot.com/
More information about the Catalyst
mailing list