Tree Tag and DTML-Documents
Hi, I can't get the tree tag to work in DTML documents. All they do is dump the following HTML in: <TABLE CELLSPACING="0"> </TABLE> They appear to work fine in DTML-Methods and what I'd like to do is have a site navigator down the left of the page. I'm trying to do with with a standard_html_header that is as follows: <HTML><HEAD><TITLE><!--#var title--></TITLE></HEAD><BODY BGCOLOR="#FFFFFF"> <TABLE><TR><TD BGCOLOR="#FFE9A3"> <dtml-tree OCM> <dtml-var id> - <dtml-var title> </dtml-tree> </TD><TD> This is where it gets wierd. This only works when viewing DTML methods. DTML documents have the same problem as above. Of course, index_html is a DTML document by default and so it doesn't show the navigator. Any ideas? Chris
Chris, A DTML Document has its own namespace, and therefore, no subobjects. A DTML Method is actually a method of its container, so it will "see" all of the subobjects of the container that it is in. Does that help? Drew ----- Original Message ----- From: Chris Withers <chrisw@nipltd.com> To: Zope Mailing List <zope@zope.org> Sent: Wednesday, February 02, 2000 6:59 AM Subject: [Zope] Tree Tag and DTML-Documents
Hi,
I can't get the tree tag to work in DTML documents. All they do is dump the following HTML in:
<TABLE CELLSPACING="0"> </TABLE>
They appear to work fine in DTML-Methods and what I'd like to do is have a site navigator down the left of the page. I'm trying to do with with a standard_html_header that is as follows:
<HTML><HEAD><TITLE><!--#var title--></TITLE></HEAD><BODY BGCOLOR="#FFFFFF"> <TABLE><TR><TD BGCOLOR="#FFE9A3">
<dtml-tree OCM> <dtml-var id> - <dtml-var title> </dtml-tree>
</TD><TD>
This is where it gets wierd. This only works when viewing DTML methods. DTML documents have the same problem as above. Of course, index_html is a DTML document by default and so it doesn't show the navigator.
Any ideas?
Chris
_______________________________________________ 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 )
Andrew Lahser wrote:
Chris,
A DTML Document has its own namespace, and therefore, no subobjects. A DTML Method is actually a method of its container, so it will "see" all of the subobjects of the container that it is in.
Therefore, it should work inside a <dtml-with "PARENTS[0]" > clause --sam -- Sam Gendler Chief Technology Officer - Impossible, Inc. 1222 State St. Suite 250 Santa Barbara CA. 93101 w: 805-560-0508 f: 805-560-0608 c: 805-689-1191 e: sgendler@impossible.com
A DTML Document has its own namespace, and therefore, no subobjects. A DTML Method is actually a method of its container, so it will "see" all of the subobjects of the container that it is in.
Therefore, it should work inside a <dtml-with "PARENTS[0]" > clause
Sadly, it doesn't appear to :( The following, which is in standard_html_header still doesn't show anything when standard_html_header is included in a DTML document. <dtml-with "PARENTS[0]" > <dtml-tree branches_expr="objectValues()"> <A HREF="<dtml-var tree-item-url>"> <dtml-var title> </A> </dtml-tree> </dtml-with> Also, can anyone shed any light on why I need the branches_expr thing in there? How come <dtml-tree> on it's own only seems to find folders (and userfolders) in the current folders and none of the other objects that are there. Finally, and this is weird, I have a DTML Document: /OCM/overview/Test/Folder/index_html which doesn't show up AT ALL in the above tree when the tree appears in /OCM/index_html (which is a DTML method in order for the tree to show up...) or anywhere else for that matter, however a DTML method in the same folder does show up... All very confusing, I promise to write a decent tree how-to when this is all sorted out ;-) Chris
<dtml-var title>
Finally, and this is weird, I have a DTML Document: /OCM/overview/Test/Folder/index_html
which doesn't show up AT ALL in the above tree when the tree appears in /OCM/index_html (which is a DTML method in order for the tree to show up...) or anywhere else for that matter, however a DTML method in the same folder does show up...
A big Doh! here and you can probably guess from the quotes above what the problem is. The DTML Document had no title, only an ID, hence it didn't show up.... adding a title solved the problem. That said, I'm still looking for answers about the other two questions. I hope they're not as simple as the one above... Chris
participants (3)
-
Andrew Lahser -
Chris Withers -
Sam Gendler