[Zope-dev] How to automatically redirect publishing request to another folder?

Joachim Schmitz js@aixtraware.de
Fri, 25 Jan 2002 10:07:08 +0100


How about creating a body-dtml method in the root, with

<dtml-with firstSlide>
<dtml-var body>
</dtml-with>


--On Freitag, Januar 25, 2002 01:51:53 -0500 "Craeg K. Strong"=20
<cstrong@arielpartners.com> wrote:

> Hello:
>
> 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!
>
> --Craeg
>
>
> _______________________________________________
> Zope-Dev maillist  -  Zope-Dev@zope.org
> 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 )



Mit freundlichen Gr=FC=DFen                              Joachim Schmitz
--------------------------------------------------------------------
AixtraWare Ingenieurb=FCro f=FCr Internetanwendungen
H=FCsgenstr. 33a, D-52457 Aldenhoven
Telefon: +49-2464-8851, FAX: +49-2464-905163
--------------------------------------------------------------------
Key fingerprint =3D DA10 CC82 62F8 1DBB 39A1  1EDC 725B 3317 A8D7 C3A6
Keyserver: http://germany.keyserver.net/en/