Try using a site access rule, it's almost as powerfull as the traversal
roulette, but it happens after zope has finished traversing. You could write
a Python Script, something like:
if string.split(context.REQUEST['PATH_INFO'], '/')[-1] ==
CAUTION: Remember how to turn off site access rules (Adding
_SUPPRESS_ACCESSRULE to the begining of the path) incase it all goes wrong
The difficulty of tactical maneuvering consists in turning the devious into
the direct, and misfortune into gain.
- Sun Tzu
----- Original Message -----
From: "Craeg K. Strong" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, January 25, 2002 6:51 AM
Subject: [Zope-dev] How to automatically redirect publishing request to
> We have a Slideshow product that is similar to OrderedFolder in that it
> maintains an ordered
> list of contents. Each subfolder represents a slide. To view a
> particular slide, you navigate to the
> subfolder, it automatically calls "index_html," and there's your slide.
> All of the slides actually acquire their index_html DTMLDocument from
> high up on the food chain. The index_html in turn calls <dtml-var
> body> and the body is, of
> course, different for each slide. This is convenient, b/c each slide
> shares header/footer/etc.
> My problem is this. When you type in the URL of the top level folder
> (that is, the slideshow folder itself)
> I want Zope to behave as if you typed in the URL of the first slide
> automagically. The Slideshow product
> has an easy way to get our mitts on the firstSlide object, so that part
> is not a problem, but I cannot get it to work.
> Of course, if I create an index_html() method directly in my
> Slideshow.py, that screws up my acquisition.
> Zope dies with an infinite recursion.
> Next try: using __bobo_traverse__() That is a little bit nasty, b/c
> you have to figure out whether you are
> the "end destination" or if Zope is just "passin' thru."
> [ See http://www.zope.org//Members/andym/wiki/MessingWithTraversal ]
> Nothing works quite right. Conceptually I know what I want to do:
> call index_html on firstSlide()
> in the _context_ of firstSlide(). However, my Zope Zen is failing me.
> Has anyone done something like this?
> Thanks in advance!
> Zope-Dev maillist - [EMAIL PROTECTED]
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope )
Zope-Dev maillist - [EMAIL PROTECTED]
** No cross posts or HTML encoding! **
(Related lists -