Re: [Zope-dev] PATH_TRANSLATED delimted with backslash ?

2000-09-11 Thread Dieter Maurer

Steve Alexander writes:
  
  When I look at the DTML Document through the web, the "self" object
  passed to the breadcrumbs external method is the folder that contains
  the DTML Document.
  (I thought that should only be the case for DTML Methods!)
I expect, it is the folder containing the external method, too.
Therefore, you get this folder as "self".

You can provide the "self" explicitly in your call:

dtml-call "breadcumbs(this(),further parameters)"


Dieter

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] PATH_TRANSLATED delimted with backslash ?

2000-09-10 Thread Steve Alexander

Evan Simpson wrote:
 
 From: "Steve Alexander" [EMAIL PROTECTED]
obj = self.restrictedTraverse(REQUEST.PATH_TRANSLATED)
 
  This stopped working when I tried the software on Windows.
 
  Bug or feature?
 
 I'm not sure, but I'm *very* curious what you're trying to accomplish with
 this code.  A better equivalent would probably be obj =
 self.getPhysicalRoot().restrictedTraverse(REQUEST.steps).

I'm producing a set of breadcrumb-style links. I want to test whether
the object at the requested URL has the attribute "breadcrumbs_text",
because if so, that text should be used instead of the results of my
breadcrumbs algorithm.

I have an object that is a DTML Document. It has the property
"breadcrumbs_text" set.

My breadcrumbs external method is called from standard_html_header.

When I look at the DTML Document through the web, the "self" object
passed to the breadcrumbs external method is the folder that contains
the DTML Document.
(I thought that should only be the case for DTML Methods!)

So, in order to check the existence of the attribute "breadcrumbs_text",
I needed to get hold of the object that was requested. I'm not using
virtual hosting for this project (although I will be later), so I threw
REQUEST.PATH_TRANSLATED in there as I could see from inspecting REQUEST
that it would give me what I needed.

It looks like using REQUEST.steps is better because it will continue to
work with virtual hosting.  I'll change the method to use REQUEST.steps.
Thanks.

--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] PATH_TRANSLATED delimted with backslash ?

2000-09-09 Thread Evan Simpson

From: "Steve Alexander" [EMAIL PROTECTED]
   obj = self.restrictedTraverse(REQUEST.PATH_TRANSLATED)

 This stopped working when I tried the software on Windows.

 Bug or feature?

I'm not sure, but I'm *very* curious what you're trying to accomplish with
this code.  A better equivalent would probably be obj =
self.getPhysicalRoot().restrictedTraverse(REQUEST.steps).

Cheers,

Evan @ digicool  4-am


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )