In the ZopeBook an example is given for listing all the information for objects in the current folder. To make it work with subfolders (ie. the page template stays in the root folder, but access it via subfolders) I changed the container/ to here/, and it worked as expected. The current folder objects were displayed rather than always the root folder. Now, i've been trying to use this technique to list the subfolder of any accessed folder but it doesn't seem to work. For example (to demonstrate), if i put this in a page template in my root folder: <p tal:content="container">container</p> <p tal:content="here">here</p> <p tal:content="here/get_folders">here/folders</p> And then access the page template from subfolders, i can see the value of "container" always stays the same (of course), and the value of "here" changes (as I'd expect), yet the list returned by "here/get_folders" always stays the same, where i would expect it to change with its context (but it continues to always list of folders from the root container)... Surely I am missing something simple? (using Zope 2.5 on FreeBSD 4.5)
Tim <tim@xxvii.net> wrote:
<p tal:content="container">container</p> <p tal:content="here">here</p> <p tal:content="here/get_folders">here/folders</p>
And then access the page template from subfolders, i can see the value of "container" always stays the same (of course), and the value of "here" changes (as I'd expect), yet the list returned by "here/get_folders" always stays the same, where i would expect it to change with its context (but it continues to always list of folders from the root container)...
What is the code of get_folders? If it is a python script, be sure it uses context and not container. -- Julien Jalon <http://nuxeo.com/>
participants (2)
-
Julien Jalon -
Tim