[Catalyst] dir structure for template files

Daniel McBrearty danielmcbrearty at gmail.com
Thu Apr 20 02:15:13 CEST 2006


gotcha. thanks. Didn't realise that the template could be found
automatically.


> I use a custom TT view, and I have:
>
>     $c->stash->{template} ||= $self->template_name($c);
>
>
> sub template_name {
>     my ( $self, $c ) = @_;
>
>     my $extension = $self->config->{TEMPLATE_EXTENSION} || '.tt';
>     my $template_suffix = delete $c->stash->{template_suffix} || '';
>     return $c->action->reverse . $template_suffix . $extension;
> }
>
>
pardon my higgerance ... how does this work? where does the custom view
live? (maybe there's a bit of TT manual I still need to look at ... ?) - (or
is it really simple and time I went to sleep ;)

thanks for the explanation. nice.

--
Daniel McBrearty
email : danielmcbrearty at gmail.com
www.engoi.com : the multi - language vocab trainer
BTW : 0873928131
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rawmode.org/pipermail/catalyst/attachments/20060420/10dd5ba8/attachment.htm 


More information about the Catalyst mailing list