[Catalyst] Problem with index.tt2
David Silva
davidslv at gmail.com
Wed Sep 30 08:09:53 GMT 2009
Good Morning,
I already had set TEMPLATE_EXTENSION =3D> '.tt2', and i solve the problem by
changing the controller Root.pm like this:
sub index :Path :Args(0) {
my ( $self, $c ) =3D @_;
# Hello World
# $c->response->body( $c->welcome_message );
$c->stash->{template} =3D 'index.tt2';
}
Thank you
2009/9/30 Matt Whipple <matt at mattwhipple.com>
> David Silva wrote:
>
>> Hi again,
>>
>> I'm following the book "Catalyst - Accelerating Perl Web Application
>> Development" by Jonathan Rockway (2007) with Catalyst 5.80013.
>>
>> And in chapter 3 the autor says to create an index.tt2 page and said that
>> we don't need to do nothing cos Catalyst will recognize the index. I sta=
rt
>> the server and it shows me the default page of catalyst.
>>
>> I'm following the book, so what i done wrong?
>>
> My guess would be that you haven't changed the template extension. See if
> index.tt works. From my recollection, the book is building on top of the
> previous example and only references some of the previously covered mater=
ial
> rather than explicitly going through it again (so also make sure you have
> the view set up).
>
> As a note, it's not that Catalyst "recognizes the index", it's that the
> view defaults to trying to display a template matching the present action
> (which in this case should be "index") with the template extension append=
ed.
>
>
>> Thanks once again!
>>
>> --
>> David Silva - http://davidslv.com/
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> List: Catalyst at lists.scsys.co.uk
>> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
>> Searchable archive:
>> http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
>> Dev site: http://dev.catalyst.perl.org/
>>
>>
>
>
> _______________________________________________
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive:
> http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
>
-- =
David Silva - http://davidslv.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20090930/e3964=
e6e/attachment.htm
More information about the Catalyst
mailing list