[Zope] verifying existence

Oleg Broytmann Oleg Broytmann <phd@phd.pp.ru>
Sat, 5 Jan 2002 15:15:24 +0300


On Fri, Jan 04, 2002 at 04:53:17PM -0600, Steven Turoff wrote:
> I'm still confused as to how I obtain thisPage. For example, the following 
> files and folders exist:
> 
> /index_html
> /services/
> 
> If I go to the URL www.mysite.com/services/index_html, I will be shown 
> /index_html because of acquisition. If I use the above advice, I get 
> <dtml-if "_.hasattr('index_html')">. However, if I was on a page such as 
> /services/foo_html, the code would be <dtml-if "_.hasattr('foo_html')">. 
> So, the question is, how do I get the name of the document being requested?

   You are doing something strange. You re trying to get the name of *the*
document and then verify if *the* document exists. I don't understand this.
If *the* document is being rendered why do you need to verify its
existance? Of course it exists - beccuse it is being rendered now!

Oleg.
-- 
     Oleg Broytmann     http://www.zope.org/Members/phd/     phd@phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.