[Zope] How to test a file ?

Arnaud Lecat lecat@hexanet.fr
Wed, 08 Sep 1999 11:30:34 +0200


You're right it doesn't work :) Here is my problem... Imagine this

|_ myfolder (folder)
|              |_ mydocument (document)
|
|_ mysidebar (method)

mydocument is the current displayed document (its a document, not a method)
From my document I call mysidebar. How can I get the id of mydocument ???
If I use <dtml-var id> it returns the id of myfolder :(

Ben Leslie wrote:

> Hi Arnaud!
>
> On Wed, 08 Sep 1999, Arnaud Lecat wrote:
>
> > Hi
> >
> > I have a dtml-in loop which cycle through documents of a directory. How
> > can I test
> > if the current item in the loop is the document wich is displayed at the
> > moment ?
> >
> > It's for sidebar menu purpose. I'd like to make the current document
> > bold or something
> > else...
> >
> > I've heard that such a menu could be made with a ZCatalog component. Is
> > that true ? How ?
>
> I have just spent all day playing around with this I cam up with something
> like this
>
> <dtml-let temp=id>
>  <dtml-with "PARENTS[0]">
>   <dtml-in "objectValues(['DTML Document'])" sort=title>
>    <dtml-if temp=="_['id']">
>     <B><dtml-var title>
>    <dtml-else>
>     <A HREF="<dtml-var id>"><dtml-var title></A>
>    </dtml-if>
>   </dtml-in>
>  </dtml-with>
> </dtml-let>
>
> Now, that was of the top of my head so it may not work, but I think that
> is the general plan of attack.
>
> Cheers,
>
> Benno

--
       >> WinErr: 080 Clavier introuvable - Veuillez appuyer
          sur n'importe quelle touche pour continuer. <<


Arnaud LECAT >> Email: lecat@hexanet.fr >> WWW page:www.hexanet.fr/~lecat

                    HEXANET >> http://www.hexanet.fr

                Z.A. Farman sud - 9 rue Roland Coffignot
                 BP 415 - 51689 Reims Cedex 2 - France
     phone: (33) 03 26 79 30 05             Fax: (33) 03 26 79 30 06