----- Original Message -----
From: Charles K. Clarkson
Sent: 19.04.2004, 8:24 Uhr

>:But now I had to change the layout and embed some sites. Their site
>:roots and template location are now
>:
>:'~/Sites/janeden/whatever' and
>:'~/Sites/janeden/whatever/templates/whatever.tpl'
>:
>:I temporarily fixed the resulting problem by adding another meta
>:tag (parent), which contains the name of the embedding site. But
>:there has to be a smarter solution.
>:
>:Can someone give me a hint?
>
>Assuming only one of the templates exist, test for the
>existence of the usual template. If it does not exist use the
>alternate template.
>
>if ( -e $template_file ) {
>$site_template = $site_root . $template_file;
>
>}else {
>$site_template = $site_root . $alternate_template_file;
>}

Hi Charles,

thanks, but the issue is not about different template files, but about whole sites 
being embedded in a directory within ~/Sites. My script assumes all sites to be 
immediate children of ~/Sites and determines the site roots and location of template 
files relative to this dir. If the site is nested deeper, the script would break 
(hadn't I inserted the parent meta tag to communicate the fact the site is nested.

Thanks again,

Jan
-- 
There are two major products that come out of Berkeley: LSD and UNIX. We don't believe 
this to be a coincidence. - Jeremy S. Anderson

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to