[Zope] tree elsewhere...
Ethan Fremen
mindlace@majordomo.net
Tue, 07 Dec 1999 00:43:45 +0000
Darcy Clark wrote:
>
> Janko,
>
> thanks for explaining this....it works for me also. Although I must
> admit that I am still suprised that I cannot get this to work somehow if
> index_html is a method.
Think of methods as a pseudopod of a folder, not a entity unto itself. They're best used for DTML code that has at least folder-wide scope, in my experience. I try to push as much presentation logic into methods as I can, and use DTML documents as content objects.
> The reason I am trying to use methods is that in
> my standard_html_header I am also using the <!--#tree--> tag - this tag
> only seems to work properly if index_html is a method. I guess I still
> don't appreciate the finer points of methods/documents and acquisition.
<dtml-tree expr="PARENTS[0]">
will make a tree starting from the folder above the DTML Document.
<dtml-if "meta_type == 'DTML Document>
<dtml-tree expr="PARENTS[0]"></dtml-tree>
<dtml-else "meta_type == 'DTML Method'>
<dtml-tree expr="PARENTS[1]"></dtml-tree>
</dtml-if>
might be what you're looking for. Feel free to add branch_expr etc.
--
Ethan "mindlace" Fremen
you cannot abdicate responsibility
for your ideology.