[Catalyst] templates

Daniel McBrearty danielmcbrearty at gmail.com
Wed Dec 20 19:59:35 GMT 2006


I have my templates at the same level as root as you mention, I've not
come across any problems.


On 12/20/06, John Napiorkowski <jjn1056 at yahoo.com> wrote:
>
> --- Octavian Rasnita <orasnita at gmail.com> wrote:
>
> > Hi,
> >
> > Could you please tell me why the templates should be
> > put under the /root
> > directory?
>
> Well, the only good reason I can think of is that
> since it's the default all other Catalyst developers
> will look for them there first.  Otherwise I know the
> whole directory structure best practices thing is an
> ongoing debate.  I don't think we've really figured it
> out yet :)  Personally I don't like /root either but
> just grew used to it.
>
> >
> > Wouldn't be more appropriate to have a "templates"
> > directory on the same
> > directory where /root is?
>
> You can do that if you want; I can't judge what is
> more appropriate.
>
> >
> > Can I create a separate directory with templates
> > which are not under /root
> > (for not allowing accessing the templates from the
> > web)?
>
> Sure, you can create a directory called /templates at
> the same level as root, and if you are using template
> toolkit for your view you can set the search path to
> find your new directory.  Here's what I did (assuming
> you have a TT view called TT.pm) in my myapp.yml file.
>
> 'View::TT':
>   INCLUDE_PATH:
>     - __path_to(templates)__
>
> You might need to check the docs, I grabbed this from
> a project I played with almost a year ago when I
> started with Catalyst.
>
> Although you can also configure static simple or
> apache to not serve your template extensions, if you'd
> rather keep it all in root.
>
> static:
>   no_logs: 0 #I like to see logs
>   ignore_extensions:
>     - tmpl
>     - tt
>     - tt2 # or whatever extension you use
>
> >
> > Thanks.
> > Octavian
> >
> >
> > _______________________________________________
> > List: Catalyst at lists.rawmode.org
> > Listinfo:
> > http://lists.rawmode.org/mailman/listinfo/catalyst
> > Searchable archive:
> >
> http://www.mail-archive.com/catalyst@lists.rawmode.org/
> > Dev site: http://dev.catalyst.perl.org/
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> _______________________________________________
> List: Catalyst at lists.rawmode.org
> Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
> Dev site: http://dev.catalyst.perl.org/
>


-- 
Daniel McBrearty
email : danielmcbrearty at gmail.com
www.engoi.com : the multi - language vocab trainer
BTW : 0873928131



More information about the Catalyst mailing list