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 ? -- >> 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
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
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
At 11:30 08/09/99 , Arnaud Lecat wrote:
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 :(
Use document_id -- Martijn Pieters, Web Developer | Antraciet http://www.antraciet.nl | Tel: +31-35-7502100 Fax: +31-35-7502111 | mailto:mj@antraciet.nl http://www.antraciet.nl/~mj | PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149 ------------------------------------------
participants (3)
-
Arnaud Lecat -
Ben Leslie -
Martijn Pieters