[Catalyst] Re: OT: Better TT pager?
Fernan Aguero
fernan.aguero at gmail.com
Sun Jun 21 14:18:25 GMT 2009
On Sun, Jun 21, 2009 at 1:37 AM, <kakimoto at tpg.com.au> wrote:
>
> Hi, there, Oliver and everyone:)
>
> Thanks for your posting:)
> Referring to
> http://www.mail-archive.com/catalyst@lists.scsys.co.uk/msg05232.html, I
> adopted the code given into my template and it looks really good but the
> hyperlink doesn't have any value. I suppose it's because [%
> c.req.uri_with(...) %] is not defined.
>
> 1)why is the Catalyst request variable being used instead of the
> Catalyst object?
K,
this may change depending on your configuration of the TT view. In my
case it's not 'c' but 'Catalyst', as in
[% Catalyst.req.uri_with() -%]
> 2)how can we get the Catalyst request working properly (ie to be defined)?
You should look into your lib/yourapp/View/TT.pm file for
CATALYST_VAR. This sets the name of the variable that contains the
catalyst context object in your templates. This is what mine looks
like:
package portfolio::View::TT;
use strict;
use base 'Catalyst::View::TT';
__PACKAGE__->config({
CATALYST_VAR => 'Catalyst',
INCLUDE_PATH => [
portfolio->path_to( 'root', 'src' ),
portfolio->path_to( 'root', 'lib' )
],
PRE_PROCESS => 'config/main',
WRAPPER => 'site/wrapper',
ERROR => 'error.tt2',
TIMER => 0,
DEBUG => 'vars',
});
> thank you :)
>
> K . akimoto
HTH. Cheers,
--
fernan
More information about the Catalyst
mailing list