On Tue, Aug 11, 2009 at 1:01 PM, Matt Whipple <m...@mattwhipple.com> wrote:

>
>> This is the default behavior for View::TT, as it says in the POD:
>>
>> If a stash item isn't defined, then it instead uses the stringification of
>> the action dispatched to (as defined by $c->action) in the above example,
>> this would be |message|, but because the default is to append '.tt', it
>> would load |root/message.tt <http://message.tt>|.
>>
>> Is that not what you wanted?
>>
>> -J
>>
>>
> That is matching according to action, I'm looking to match on path (without
> having to create logically redundant complementary actions).
>
>
>

So, essentially, you have a separate path versus the action path, and want
it to default to the URI path and not the action Path?

Essentially:

sub end : Private ActionClass('RenderView') {
    my ( $self, $c ) = @_;
    $c->stash->{template} .= $c->req->uri->path . ".tt";
}


Is this right? This seems like a decent enough configuration idea to have
directly in Catalyst::View::TT, rather than always pick the action.

-J
_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/

Reply via email to