You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by bt...@linuxmonth.com on 2001/02/09 16:48:28 UTC

Re: How can I have multiple OBJECT_BASE for differnt directoriesforone site ?


On Fri, 9 Feb 2001, Gerald Richter wrote:

> >
> > Just an idea, as a workaround:
> >
> 
> Neil, you are right. We don't need two configurations blocks and it's not
> only a workaround, this is the better solution.
> 

Thanks Neil and Gerald. The below solution works great. Maybe add that to
the document.

> Just write
> 
> <Location />
>     PerlSetEnv EMBPERL_OBJECT_BASE sat-template.html
>     PerlSetEnv EMBPERL_FILESMATCH "\.html"
>     SetHandler perl-script
>     PerlHandler HTML::EmbperlObject
>     Options ExecCGI FollowSymLinks
> </Location>
> 
> and rename /login/sat-login-template.html to /login/sat-template.html and
> EmbperlObject will pickup the correct template
> 
> Sorry, Baiju, I could thought of this earlier. That's a much better way to
> go (at least if there isn't something in your special case that I am
> missing)

Here's a quick observation. I was doing [- Execute ("header.html") -] it
is much better to give it full path because the template file looks in the
current direcoty as its root. So even [- Execute ("/header.html") -] fails
under the /login directory because the file.html is in the / directory.

[- Execute ("$docroot/header.html") -] works fine from any base file.

Thank you very much. 

~Baiju


Re: How can I have multiple OBJECT_BASE for differnt directoriesforone site ?

Posted by Gerald Richter <ri...@ecos.de>.
>
> Here's a quick observation. I was doing [- Execute ("header.html") -] it
> is much better to give it full path because the template file looks in the
> current direcoty as its root. So even [- Execute ("/header.html") -] fails
> under the /login directory because the file.html is in the / directory.
>
> [- Execute ("$docroot/header.html") -] works fine from any base file.
>

Yes, this works, but then you can't overwrite your header.html in a
subdirectory. It's better to set EMBPERL_OBJECT_STOPDIR to docroot, in this
case Embperl searches always upwards to the stopdir, regardless where it
founds the base template, so header.html without path will work again.

Gerald


-------------------------------------------------------------
Gerald Richter    ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
E-Mail:     richter@ecos.de         Voice:    +49 6133 925131
WWW:        http://www.ecos.de      Fax:      +49 6133 925152
-------------------------------------------------------------