[Catalyst] context object in TT

rahed raherh at gmail.com
Thu Mar 15 19:52:58 GMT 2007


On 3/15/07, Bill Moseley <moseley at hank.org> wrote:
> On Thu, Mar 15, 2007 at 06:00:33PM +0000, Adeola Awoyemi wrote:
> >
> > On 15 Mar 2007, at 17:01, rahed wrote:
> >
> > >[% c.config.name %] in the template, nothing is shown.
> >
> > I think this needs to be:
> >
> > [% Catalyst.config.name %]
>
> C::V::TT has:
>
> sub template_vars {
>     my ( $self, $c ) = @_;
>
>     my $cvar = $self->config->{CATALYST_VAR};
>
>     defined $cvar
>       ? ( $cvar => $c )
>       : (
>         c    => $c,
>         base => $c->req->base,
>         name => $c->config->{name}
>       )
> }

Thanks all,

I removed CATALYST_VAR line from TT configuration and context is c as suggested.

Radek



More information about the Catalyst mailing list