[Zope] How can you tell if what kind of object it is?

Adrian Esteban Madrid am246@email.byu.edu
Tue, 09 Nov 1999 13:57:58 -0700


Is there something like _.isDTMLMethod, _.isDTMLDocument, _.isFolder
hidden somewhere? I've been browsing the documentation but have not been
able to figure this out. I need that to create a dynamic navigational
bar that sshould get set like this:

      <dtml-call "REQUEST.set('fobs', [])"> <!-- Folders -->
      <dtml-call "REQUEST.set('dobs', [])"> <!-- Documents -->
      <!-- Fill Folders and Documents -->
      <dtml-in "PARENTS[0].objectValues()" skip_unauthorized>
        <dtml-let item="_.getitem('sequence-item', 0)">
         <dtml-unless "hasProperty('hidden') and hidden">
            <dtml-if "item.isFolder"> <!-- This is what I'm looking for!
-->
              <dtml-call "fobs.insert(0, item)">
            <dtml-elif "item.isDTMLMethod"> <!-- This is what I'm
looking for! -->
              <dtml-call "dobs.insert(0, item)">
            </dtml-if>
          </dtml-unless>
        </dtml-let>
      </dtml-in>

Any ideas?

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