[Zope] ZClass container acquisition
Kapil Thangavelu
kvthan@wm.edu
Tue, 25 Apr 2000 01:16:56 -0400
Doh... i tried testing this (and some variations) and it doesn't seem to
work outside of the root folder. anyone have any ideas?
> first make Zleaf a method, this is the clasic def. of a method, since
> its acting on its container. if its just looking for documents to link
> it could be as simple as.
> <table><tr>
> <dtml-in "objectItems(['DTML Document'])">
> <dtml-with sequence-item>
> <td><a href="<dtml-var absolute_url>"><dtml-var title_or_id></a></td>
> </dtml-with>
> </dtml-in>
> <tr></table>
>
> you can call this method somewhere in your root index_html wherever you
> want the toolbar like this
> <dtml-var "FolderContainingMethodAccesibleFrom Root.ZLeaf(_.None, _)">
i tried it putting the method in the root folder and as above, and with
an equivalent different method, and directly in standard_header but if i
switch folders i always get the same error. traceback below.
incidentally i found that a checking for DTML Method in the root folder
won't show any of the standard_ stuff.
any help appreciated.
Kapil
www.sin.wm.edu
TypeError
Sorry, a Zope error occurred.
Traceback (innermost last):
File /home/smog/asti/Zope/lib/python/ZPublisher/Publish.py, line
214, in publish_module
File /home/smog/asti/Zope/lib/python/ZPublisher/Publish.py, line
179, in publish
File /home/smog/asti/Zope/lib/python/Zope/__init__.py, line 202, in
zpublisher_exception_hook
(Object: ElementWithAttributes)
File /home/smog/asti/Zope/lib/python/ZPublisher/Publish.py, line
165, in publish
File /home/smog/asti/Zope/lib/python/ZPublisher/mapply.py, line 160,
in mapply
(Object: index_html)
File /home/smog/asti/Zope/lib/python/ZPublisher/Publish.py, line
102, in call_object
(Object: index_html)
File /home/smog/asti/Zope/lib/python/OFS/DTMLMethod.py, line 150, in
__call__
(Object: index_html)
File /home/smog/asti/Zope/lib/python/DocumentTemplate/DT_String.py,
line 502, in __call__
(Object: index_html)
File /home/smog/asti/Zope/lib/python/OFS/DTMLMethod.py, line 146, in
__call__
(Object: standard_html_header)
File /home/smog/asti/Zope/lib/python/DocumentTemplate/DT_String.py,
line 502, in __call__
(Object: standard_html_header)
File /home/smog/asti/Zope/lib/python/DocumentTemplate/DT_In.py, line
691, in renderwob
(Object: objectItems(['DTML Method']))
File /home/smog/asti/Zope/lib/python/DocumentTemplate/DT_With.py,
line 132, in render
(Object: sequence-item)
File /home/smog/asti/Zope/lib/python/OFS/DTMLMethod.py, line 146, in
__call__
(Object: searchEmail)
File /home/smog/asti/Zope/lib/python/DocumentTemplate/DT_String.py,
line 502, in __call__
(Object: searchEmail)
File /home/smog/asti/Zope/lib/python/OFS/DTMLMethod.py, line 146, in
__call__
(Object: standard_html_header)
File /home/smog/asti/Zope/lib/python/DocumentTemplate/DT_String.py,
line 502, in __call__
(Object: standard_html_header)
TypeError: too many arguments; expected 2, got 3