[Zope] [Fwd: [Zope] How can folder address its contents?]

Maarten Slaets maarten.slaets@kpnqwest.com
Tue, 14 Dec 1999 11:36:29 +0100


fyi

Maarten Slaets wrote:
 
 this is the index I use for 'document folders' in which users can upload
 stuff with webdav:
 
 <ul>
 <dtml-in "PARENTS[0].objectValues(['Folder'])">
  <dtml-if expr="id=='index_html'">
  <dtml-else>
   <li><img src="/misc_/OFSP/Folder_icon.gif"> <a href="<dtml-var
absolute_url>"><dtml-var id></a></li>
  </dtml-if>
 </dtml-in>
 <dtml-in "PARENTS[0].objectValues(['File', 'DTML Document'])">
  <dtml-if expr="id=='index_html'">
  <dtml-else>
   <li><img src="/misc_/OFSP/File_icon.gif"> <a href="<dtml-var
absolute_url>"><dtml-var id></a></li>
  </dtml-if>
 <dtml-else>
   Nothing in folder.
 </dtml-in>
 </ul>
 
 ofcourse there's room for improvement :)
 * <dtml-if expr="id=='index_html'"> isn't working
 * icon displaying sould detect wich type of object it is
 * ...
 
 hope it can be of use!
 
> "Robert W. Erb" wrote:
> >
> > I want to iterate over the contents of a folder.  I can't do it by
> > name, since items will be added and taken out of the folder at run
> > time, so I don't know what they'll be called.
> >
> > I think I'll figure out the iteration ok, but how do I get at the
> > objects contained in a folder, other than by name?
> >
> > --
> > . . . . . . . . . . . . . . . .
> >  .
> > . Bob Erb
> >  .
> > . I don't want to die today!
> >
> > _______________________________________________
> > Zope maillist  -  Zope@zope.org
> > http://lists.zope.org/mailman/listinfo/zope
> >           No cross posts or HTML encoding!
> > (Related lists -
> >  http://lists.zope.org/mailman/listinfo/zope-announce
> >  http://lists.zope.org/mailman/listinfo/zope-dev )
> 
> --
> Maarten Slaets
> Web Developer
> KPNQwest Belgium
> http://www.fonky.com/vcard/MaartenSlaets/

-- 
Maarten Slaets
Web Developer
KPNQwest Belgium
http://www.fonky.com/vcard/MaartenSlaets/