[Catalyst] :Template() Attribute

Bill Moseley moseley at hank.org
Mon Jun 18 16:06:45 GMT 2007


On Mon, Jun 18, 2007 at 02:42:13PM +0000, Zbigniew Lukasiak wrote:
> 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 we need to be able to override the entire template path.
That's why I use template for the full path and template_action for
the path relative to the namespace.

-- 
Bill Moseley
moseley at hank.org




More information about the Catalyst mailing list