[Zope] Problems looping through Folders and Documents

Adrian Esteban Madrid am246@email.byu.edu
Tue, 09 Nov 1999 00:53:36 -0700


I want to have two different menues: one with the Folders in the current
folder and another with the DTML Documents again in the current folder.
Here it goes what I've come up with (abridged, please don't laugh at my
cut/steal-and-paste ignorance here):

<!-- SubRoutine = Folders -->
<dtml-call "REQUEST.set('PFold', [])">
<!-- Fill tmp with Folders -->
<dtml-in "PARENTS[0].objectValues(['Folder'])">
  <dtml-let item=sequence-item>
    <dtml-unless "hasProperty('hidden') and hidden">
      <dtml-call "PFold.insert(0, item)">
    </dtml-unless>
  </dtml-let>
</dtml-in>
<!-- Create panel if necessary -->
<dtml-if PFold>
  <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 NOF=LY>
    <dtml-in PFold>
      <dtml-with sequence-item>
        <TR>
          <TD WIDTH=98 BGCOLOR="#FFFFFF">
            <A HREF="<dtml-var absolute_url>">
              <dtml-if "hasProperty('nickname')">
                <dtml-var nickname>
              <dtml-else>
                <dtml-var title_or_id>
              </dtml-if></a></B></font>
          </TD>
        </TR>
      </dtml-with>
    </dtml-in>
  </TABLE>
</dtml-if>

This works just great for the first objetive. Unfortunately, I try doing
the same thing for a second time only with 'DTML Document' but it just
loops forever (a Python thread uses up 99% of the CPU). I don't know.
I've been playing with this all night and haven't been able to figure it
out. HELP!

--
Adrian Esteban Madrid
Network Support, ATS
Brigham Young University