[Zope-it] dtml-tree

Giuseppe Masili giuseppe@linux.it
Thu, 27 Mar 2003 00:52:55 +0100 (CET)


> qualcuno ha la pi=F9 pallida idea di come sostituire il pi=F9 il meno
> del dtml-tree con altre icone?

Purtroppo abbiamo visto che non si pu=F2.
Un'alternativa avendo una struttura di questo tipo:

Folder
  Sezione01
    Info01
    Info02
  Sezione02
    Info01

Puoi crearti un DTML Method con questo codice:

<dtml-unless id_test>
  <dtml-call "REQUEST.set('id_test', '')">
</dtml-unless>

<dtml-tree>
  <dtml-if "id=3D=3Did_test">
    [ICONA APERTA] <dtml-var title_or_id>
    <dtml-with "_[id_test]">
      <dtml-in "objectValues()">
         <dtml-var sequence-item><BR>
      </dtml-in>
    </dtml-with>
  <dtml-else>
    [ICONA CHIUSA] <A HREF=3D"?id_test=3D<dtml-var id>">
                   <dtml-var title_or_id></A>
  </dtml-if>
</dtml-tree>

notte ;)

--=20
Giuseppe Masili                                        giuseppe@linux.it
Admin Zope Italy                                      http://www.zope.it
The limits of a writing a product are really your imagination.
                      Andy McKay - http://plone.org/documentation/book/8