Hi Holger, from what you tell, you used a DMTL-Document for the code you described? That's wrong, you have to use a DTML-Method... The Zope Book tells you about the difference. The biggest problem here is that the context, your dtml is called upon is wrong. A DTML-Document provides that itself, while the DTML-Method uses the folder the method is called as context, which is what you want. Regards from Muenchen Jochen Am Freitag den, 23. November 2001, um 22:08, schrieb Holger Paulsen:
Hello!
I am very new to Zope, I do not know something about Python and DTML and I am german. So, at first, I have to apologize my bad english.
And now my problem: I would like to show the content of a directory. Simple. That fine Zope-book says:
| <ul> | <dtml-in expr="objectValues('../File')"> | <li><a href="&dtml-absolute_url;"><dtml-var title_or_id></a></li> | </dtml-in> | </ul>
should do this.
I created a folder, put two JPGs from my home directory into it and pasted that code into the index_html-DTML-document.
It does not work. When I view this index.html-File in a Browser, the result is:
| <ul> | </ul>
Please note the "space" before "</ul>".
My system is GNU/Linux; Debian testing. "python -v" answers:
| # /usr/lib/python1.5/exceptions.pyc matches /usr/lib/python1.5/exceptions.py | import exceptions # precompiled from /usr/lib/python1.5/exceptions.pyc | # /usr/lib/python1.5/site.pyc matches /usr/lib/python1.5/site.py | import site # precompiled from /usr/lib/python1.5/site.pyc | # /usr/lib/python1.5/os.pyc matches /usr/lib/python1.5/os.py | import os # precompiled from /usr/lib/python1.5/os.pyc | import posix # builtin | # /usr/lib/python1.5/posixpath.pyc matches /usr/lib/python1.5/posixpath.py | import posixpath # precompiled from /usr/lib/python1.5/posixpath.pyc | # /usr/lib/python1.5/stat.pyc matches /usr/lib/python1.5/stat.py | import stat # precompiled from /usr/lib/python1.5/stat.pyc | # /usr/lib/python1.5/UserDict.pyc matches /usr/lib/python1.5/UserDict.py | import UserDict # precompiled from /usr/lib/python1.5/UserDict.pyc | Python 1.5.2 (#0, Apr 10 2001, 10:03:44) [GCC 2.95.3 20010219 (prerelease)] on linux2 | Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam | import readline # dynamically loaded from /usr/lib/python1.5/lib-dynload/readline.so
The installed Debian version of Zope is 2.3.3-1.
Something seems to be borken. How can I fix it?
TIA
Holger
_______________________________________________ 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 )