[Zope] Is a Global <dtml-with> possible? How can I make <dtml-with> stay in scope forever?

Dieter Maurer dieter@handshake.de
Tue, 9 Apr 2002 21:51:35 +0200


zvi@12thplanetcafe.com writes:
 > Here is my problem: I have a Squishdot instance named
 > 12thPlanetCafe. I wish for visitors to my root Zope
 > directory's index_html page to go automatically to the
 > Squishdot instance's index_html page instead. 
 > 
 > Hence I changed the index_html in the root Zope
 > directory so that it reads:
 > 
 > <dtml-with "_.getitem('12thPlanetCafe')">
 > <dtml-var index_html>
 > </dtml-with>
 > ....
 > However, once these visitors click on any link within
 > the page the <dtml-with "_.getitem('12thPlanetCafe')"> 
 > goes out of scope. Instead of being sent to 
 > 
 > http://12thPlanetCafe/12thPlanetCafe/whateverpagewasrequested 
 > 
 > they instead go to 
 > 
 > http://12thPlanetCafe/whateverpagewasrequested.
You may consider an explicit "redirect" (that's a RESPONSE method,
documented in Zope's online help -> Zope Help -> API Reference).

Maybe "emulateRedirect" from

  <http://www.dieter.handshake.de/pyprojects/zope>

can help you, too.


Dieter