Hi all, first I'd like to say thanks to all those who have been very helpful and answered my previous couple of questions. This is a weird one - I am trying to use the tree tag by adapting the code in the Zope book chapter 7 example. I want to display only folders containing documents in a tree on a sidebar on the site home page. my folder structure in Zope goes: Root - MyFolder - documentsFolder - docFolder1 - docFolder2 - docFolder3 - docFolder3A - docFolder3B and so on.. I have given all the 'docFolder' folder objects a boolean property 'doc_folder' that is set to true. As suggested in the book I have created a python script with the id of 'docFolders' with the following code: results=[] for object in context.objectValues(['Folder']): if object.hasProperty('doc_folder') and object.doc_folder: results.append(object) return results I then created a dtml method to display the tree called 'libraryMap'. code as follows: <p> <a href="&dtml-URL0;?expand_all=1">Expand All</a><br>  <a href="&dtml-URL0;?collapse_all=1">Collapse All</a> </p> <dtml-tree branches="docFolders" skip_unauthorized="1"> <a href="&dtml-absolute_url;" TARGET="text"><dtml-var title_or_id></a> </dtml-tree> Both of these methods are located in the 'documentsFolder' (see Folder structure above). When I test libraryMap using the view tab in Zope it works fine (yippee!), but when I add a dtml method in MyFolder to call the method 'libraryMap' with the following code: <dtml-with documentsFolder> <dtml-var libraryMap> </dtml-with> All that gets displayed are the two hyperlinks for 'Expand All' and 'Collapse All'. So the tree doesn't seem to be working even though the method returns with no errors. Thanks in advance to anyone who can help! :-) Sandy. **NB: Interestingly, if I add a test method to the documentsFolder to call libraryMap simply with <dtml-var libraryMap> it will work if the test method is a dtml-method, but not if it is a dtml-document when the same behaviour as described above results!?
participants (1)
-
Sandy Britain