[Zope] dtml-tree question

complaw@hal-pc.org complaw@hal-pc.org
Mon, 1 Oct 2001 21:22:33 GMT


I've hit the documentation, and looked at several examples, but I haven't found
what is needed.

The following code is an attempt to have a tree tag show the Folders and DTML
Documents.  However, I want to put a hyperlink only to the DTML Documents (not
the Folders).

Note, this code does not work...

<P ALIGN="left"><STRONG>Categories and Clauses:</STRONG>&nbsp;&nbsp;&nbsp;(<A
HREF="<dtml-var URL0>?expand_all=1">expand all</A>, <A HREF="<dtml-var
URL0>?collapse_all=1">collapse all</A>)
    <dtml-tree branches_expr="objectValues(['Folder', 'DTML Document'])"
sort=title skip_unauthorized>
      <dtml-if expr="sequence-item == objectValues('Folder')">
        <IMG SRC="<dtml-var SCRIPT_NAME>/<dtml-var icon>">&nbsp;<dtml-var title>
      <dtml-if expr="sequence-item == objectValues('DTML Document')">
        <IMG SRC="<dtml-var SCRIPT_NAME>/<dtml-var icon>">&nbsp;<A
HREF="&absoulte_url;"><dtml-var title></A>
      </dtml-if>
    </dtml-tree>
  </P>


Zope is complaining about the user of "sequence".  Is there a way to check to
see what type of object it is so that the hyperlink is enabled only for certain
object types?

TIA,

Ron