[Catalyst] :Template() Attribute

Matt S Trout dbix-class at trout.me.uk
Mon Jun 18 16:09:31 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 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.

-- 
      Matt S Trout       Need help with your Catalyst or DBIx::Class project?
   Technical Director    Want a managed development or deployment platform?
 Shadowcat Systems Ltd.  Contact mst (at) shadowcatsystems.co.uk for a quote
http://chainsawblues.vox.com/             http://www.shadowcatsystems.co.uk/ 



More information about the Catalyst mailing list