On Sun, Jun 21, 2009 at 1:37 AM, <[email protected]> wrote:
>
> Hi, there, Oliver and everyone:)
>
>  Thanks for your posting:)
>  Referring to
> http://www.mail-archive.com/[email protected]/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

_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to