objectValues and root folder in a VirtualHostMonster site
Hi I have a site which I developed as a sub site of the root zope folder: /test_web_site I use apache rewriting and the VirtHostMonster to make /test_web_site/ the root of the particular site I'm working on. Unfortunately we used DTML (my other ones now use ZPT but I don't have time to rewrite this one at the moment). I have a piece of code which loops through all the folders: <dtml-in expr="objectValues('Folder')"> ... Previously it was: <dtml-in expr="test_web_site.objectValues('Folder')"> and this worked fine. Now with the test_web_site removed (so that I can relocate as necessary) I get nothing returned. Can anyone point me in the right direction ? I would have thought that something along the lines of expr="root.objectValues('Folder')" would be the right thing to do, but can't find the ccorrect syntax. Regards, Pete PS: using Zope 2.6.0
Pete Phillips wrote at 2003-7-23 16:17 +0100:
... <dtml-in expr="objectValues('Folder')"> ...
Previously it was:
<dtml-in expr="test_web_site.objectValues('Folder')">
and this worked fine.
Now with the test_web_site removed (so that I can relocate as necessary) I get nothing returned.
Almost surely, your DTML object is a DTML Document. Usually, you should use DTML Methods and avoid DTML Documents.
Can anyone point me in the right direction ? I would have thought that something along the lines of expr="root.objectValues('Folder')" would be the right thing to do, but can't find the ccorrect syntax.
There is a receipe (on "zopelabs", I think) on how to access the Zope root. Dieter
participants (2)
-
Dieter Maurer -
Pete Phillips