[cgiapp] how to set tmpl path for application with sub applications

P Kishor punk.kish at gmail.com
Fri Aug 14 14:02:26 EDT 2009


I have the following directory structure

/htdocs/apps/index.cgi      => http://../
/htdocs/apps/app1/index.cgi => http://../app1/
/htdocs/apps/app2/index.cgi => http://../app2/
..

/apps/perl/Apps.pm
/apps/perl/Apps1.pm
/apps/perl/Apps2.pm
..

Apps1 and Apps2 "use base ‘Apps’"
Apps "use base ‘CGI::Application’"

/apps/tmpl/_head.tmpl
/apps/tmpl/_foot.tmpl
/apps/tmpl/home.tmpl
..

/apps/app1/tmpl/_head.tmpl
/apps/appl/tmpl/_foot.tmpl
/apps/app1/tmpl/home.tmpl
..

Question: What should my tmpl_path be so I can do the following

<!-- inside /apps/app1/tmpl/home.tmpl -->

<!-- global header -->
<TMPL_INCLUDE ../_head.tmpl>

<!-- app1 header -->
<TMPL_INCLUDE _head.tmpl>

<!-- app1 content -->
<p>Welcome to App 1</p>

<!-- app1 footer -->
<TMPL_INCLUDE _foot.tmpl>

<!-- global footer -->
<TMPL_INCLUDE ../foot.tmpl>


-- 
Puneet Kishor http://www.punkish.org
Carbon Model http://carbonmodel.org
Charter Member, Open Source Geospatial Foundation http://www.osgeo.org
Science Commons Fellow, http://sciencecommons.org/about/whoweare/kishor
Nelson Institute, UW-Madison http://www.nelson.wisc.edu
-----------------------------------------------------------------------
Assertions are politics; backing up assertions with evidence is science
=======================================================================
Sent from Madison, WI, United States


More information about the cgiapp mailing list