[Catalyst] Where to put template files?

Dr. Jennifer Nussbaum bg271828 at yahoo.com
Thu Jun 8 21:15:40 CEST 2006



> On 08/06/06, *Dr. Jennifer Nussbaum* 
> > wrote:
> 
> 
> 
>         You can do something like:
> 
> 
>         SetHandler perl-script
>         PerlResponseHandler MyApp
> 
>         Alias /myapp/static /path/to/myapp/root/static
> 
>         Order allow,deny
>         Allow from all
> 
>         SetHandler default-handler
> 
>     Thank you!!!
> 
>     But one question--where do my templates go? Right now their under,
>     lets say, /path/to/myapp/root/. And i dont want to change anything
>     in MyApp.pm so i can
>     keep running it with the builtin testing server.

If everything is working fine under the test server, then it should Just 
Work (tm) under apache. Templates don't have to be moved.

Thank you for this and thank you to everyone whose responded in detail about setting this up but i think my main question is still out there.

i dont want to change INCLUDE_PATH in Template Toolkit because if i specify a direct path the testserver wont work, right?

And i understand that this will "Just Work" under apache if i leave everything where it is but thats not what im asking. i want to know where to put it if i DO need to move thing. Consider this:

Right now i can create MyApp anywhere, it can be /home/jen/temporary_projects/myapp/lib/MyApp.pm. And then if I run the testserver it will find my templates at /home/jen/temporary_projects/myapp/root/header.tt. But if i run this under apache i DONT want to keep MyApp at /home/jen/temporary_projects, i want to move it to something like /usr/local/web/modules/MyApp.pm where the rest of my webapps are, and apache points to them. But then i cant keep my templates in ~/temporary_projects or they wont be found. BUT if I make something like /usr/local/web/templates/myapp/ and point INCLUDE_PATH to THAT, then the testserver wont find it if im running on the development version in temporary_projects.

im sorry if im not explaining things well but what i really want is way that i can do two things: 1. run a development version with the testserver and run a production version with apache, and 2. do this without changing code between the versions (changing the code to get the production version to point to different directories that is).

is that clearer? Thanks for keeping on reading!!

Jen

 __________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rawmode.org/pipermail/catalyst/attachments/20060608/51691234/attachment.htm 


More information about the Catalyst mailing list