[Catalyst] TTSite help
Jennifer Ahn
jenahn at stanford.edu
Fri Jan 25 00:42:12 GMT 2008
the template file is here:
MyApp/root/src/students/list.tt2
this is what i had in my original Students controller class that got me
to that error:
$c->stash->{template} = 'students/list.tt2'
When i changed the path to include 'src':
$c->stash->{template} = 'src/students/list.tt2'
it worked!!
this is weird because i configured my TT.pm to include the path to my
'src' directory:
__PACKAGE__->config({
CATALYST_VAR => 'Catalyst',
INCLUDE_PATH => [
AdminApp->path_to( 'root', 'src' ),
AdminApp->path_to( 'root', 'lib' )
],
...
any ideas as to why it's not looking under 'src'?
thanks,
jennifer
mdh2112 at speakeasy.net wrote:
> On Thu Jan 24 15:41 , Jennifer Ahn sent:
>
> list.tt2 is under /root/src/students
>
> J. Shirley wrote:
> > On Jan 24, 2008 3:09 PM, Jennifer Ahn <jenahn at stanford.edu
> <javascript:top.opencompose('jenahn at stanford.edu','','','')>
> > <jenahn at stanford.edu
> <javascript:top.opencompose('jenahn at stanford.edu','','','')>>> wrote:
> >
> > Hello!
> >
> > I'm writing my first Catalyst application using TTSite and I'm
> running
> > into this error:
> > [debug] Rendering template "students/list.tt2"
> > [error] Couldn't render template "file error - students/list.tt2:
> > not found"
> >
> > If anyone has run into a problem like this please help :)
> >
> > Thank you!
> >
> > Jennifer
> >
> >
> > Where did you write out your students/list.tt2 file? TTSite puts all
> > of its templates under root/src rather than just root/
> >
> > So, you'll need to have root/src/students/list.tt2 in there.
> >
> > -J
> >
> >
> > --
> > J. Shirley :: jshirley at gmail.com
> <javascript:top.opencompose('jshirley at gmail.com','','','')>
> <jshirley at gmail.com
> <javascript:top.opencompose('jshirley at gmail.com','','','')>> ::
> > Killing two stones with one bird...
> > http://www.toeat.com <parse.pl?redirect=http%3A%2F%2Fwww.toeat.com>
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > List: Catalyst at lists.scsys.co.uk
> <javascript:top.opencompose('Catalyst at lists.scsys.co.uk','','','')>
> > Listinfo:
> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> <parse.pl?redirect=http%3A%2F%2Flists.scsys.co.uk%2Fcgi-bin%2Fmailman%2Flistinfo%2Fcatalyst>
> > Searchable archive: http://www.mail-archive.com/
> <parse.pl?redirect=http%3A%2F%2Fwww.mail-archive.com%2Fcatalyst%40lists.scsys.co.uk%2F>catalyst at lists.scsys.co.uk
> <javascript:top.opencompose('catalyst at lists.scsys.co.uk','','','')>/
> > Dev site: http://dev.catalyst.perl.org/
> <parse.pl?redirect=http%3A%2F%2Fdev.catalyst.perl.org%2F>
> >
>
> _______________________________________________
> List: Catalyst at lists.scsys.co.uk
> <javascript:top.opencompose('Catalyst at lists.scsys.co.uk','','','')>
> Listinfo:
> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> <parse.pl?redirect=http%3A%2F%2Flists.scsys.co.uk%2Fcgi-bin%2Fmailman%2Flistinfo%2Fcatalyst>
> Searchable archive: http://www.mail-archive.com/
> <parse.pl?redirect=http%3A%2F%2Fwww.mail-archive.com%2Fcatalyst%40lists.scsys.co.uk%2F>catalyst at lists.scsys.co.uk
> <javascript:top.opencompose('catalyst at lists.scsys.co.uk','','','')>/
> Dev site: http://dev.catalyst.perl.org/
> <parse.pl?redirect=http%3A%2F%2Fdev.catalyst.perl.org%2F>
>
> Do you mean '/root/' at the top level of the filesystem? The templates
> are found under the directory named 'root' in the Catalyst app directory.
>
> I'm just making sure this is clear, because there is a /root/ at the
> top fs level, and I can understand that as one possible source of
> confusion.
>
> Mike
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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/
>
More information about the Catalyst
mailing list