Re: [htmltmpl] placing .tmpl files in a subdirectory?
Brought to you by:
samtregar
From: Douglas K. <dlk...@rh...> - 2002-07-02 21:11:54
|
On Tuesday 02 July 2002 10:51 am, Sam Tregar wrote: > On Tue, 2 Jul 2002, Will wrote: > > Does anyone here place their .tmpl files in a special > > directory assigned just for templates, like maybe: > > > > /cgi-bin/templates > > > > I was thinking of doing this for organizational > > purposes, but I wasn't sure of what problems I might > > run into, or what path I would have to use in the CGI > > programs, etc... > > Yes. If you do that, just use the path option to specify the path to the > templates: > > my $t = HTML::Template->new(filename => 'foo.tmpl', > path => 'templates'); > Ok I am curious, Can I do the following. This way I can have the template name that is assocated with the script and at the same level as the script directory. All the while not having to modify the following line. I would like it to be a cut and paste into each script. my $t = HTML::Template->new(filename => $0.'.tmpl', path => '../templates'); -- Douglas Kirkland Technical Support Department Rhyton Corporation te...@rh... http://www.rhyton.com |