[Catalyst] :Template() Attribute
Zbigniew Lukasiak
zzbbyy at gmail.com
Mon Jun 18 15:42:13 GMT 2007
On 6/18/07, Bill Moseley <moseley at hank.org> wrote:
...
> Do you mean instead of $c->action->reverse like C::V::TT does now?
> That is, so you always have to specify the template name?
What I see in my copy of C::V::TT is:
sub process {
my ( $self, $c ) = @_;
my $template = $c->stash->{template}
|| $c->action . $self->config->{TEMPLATE_EXTENSION};
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.
--
Zbyszek
More information about the Catalyst
mailing list