FAQ

On Sun, Jun 21, 2009 at 1:37 AM, 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

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 3 of 4 | next ›
Discussion Overview
groupcatalyst @
categoriescatalyst, perl
postedJun 21, '09 at 4:37a
activeJun 21, '09 at 10:53p
posts4
users2
websitecatalystframework.org
irc#catalyst

2 users in discussion

K. Akimoto: 3 posts Fernan Aguero: 1 post

People

Translate

site design / logo © 2022 Grokbase