Hi, (sorry for the cross-posting with zope-forums.org, I didn't realise that it doesn't post directly to this forum) I have been looking for a method to display a tree structure in ZPT, where the tree is built from simple, hierarchical data (rather than folderish objects). The tree_menu example looked the most promising but I can't seem to get it to work. I'm getting the following error... Request URL: http://linux3:8080/Examples/zpt_examples/tree_menu.pt Exception Type: IndexError Exception Value: string index out of range Does anyone know why this 'out of the box' example isn't working? I'm on Zope 2.6.1. Is this the best method in ZPT or is there a tree widget for ZPT (like dtml-tree)?? I would like to implement this tree widget under a Plone site. Would there be a conflict (due to cookies) with the Plone navigation slot? Thanks for your feedback, Erik. Traceback... Traceback (innermost last): Module ZPublisher.Publish, line 98, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.Scripts.Bindings, line 252, in __call__ Module Shared.DC.Scripts.Bindings, line 283, in _bindAndExec Module Products.PageTemplates.ZopePageTemplate, line 228, in _exec Module Products.PageTemplates.PageTemplate, line 95, in pt_render - <ZopePageTemplate at /Examples/zpt_examples/tree_menu.pt> Module TAL.TALInterpreter, line 200, in __call__ Module TAL.TALInterpreter, line 244, in interpret Module TAL.TALInterpreter, line 703, in do_useMacro Module TAL.TALInterpreter, line 244, in interpret Module TAL.TALInterpreter, line 726, in do_defineSlot Module TAL.TALInterpreter, line 244, in interpret Module TAL.TALInterpreter, line 473, in do_setLocal_tal Module Products.PageTemplates.TALES, line 217, in evaluate - URL: /Examples/zpt_examples/tree_menu.pt - Line 11, Column 4 - Expression: <PythonExpr here.simple_tree(here, 'tree')> - Names: {'container': <Folder instance at 93c1be8>, 'default': <Products.PageTemplates.TALES.Default instance at 0x86d3444>, 'here': <Folder instance at 93c1be8>, 'loop': <SafeMapping instance at 8eb0ae8>, 'modules': <Products.PageTemplates.ZRPythonExpr._SecureModuleImporter instance at 0x86c4194>, 'nothing': None, 'options': {'args': ()}, 'repeat': <SafeMapping instance at 8eb0ae8>, 'request': <HTTPRequest, URL=http://linux3:8080/Examples/zpt_examples/tree_menu.pt>, 'root': <Application instance at 8ce5cc8>, 'template': <ZopePageTemplate at /Examples/zpt_examples/tree_menu.pt>, 'traverse_subpath': [], 'user': admin} Module Products.PageTemplates.ZRPythonExpr, line 48, in __call__ - __traceback_info__: here.simple_tree(here, 'tree') Module Python expression "here.simple_tree(here, 'tree')", line 2, in f Module Shared.DC.Scripts.Bindings, line 252, in __call__ Module Shared.DC.Scripts.Bindings, line 283, in _bindAndExec Module Products.PythonScripts.PythonScript, line 315, in _exec Module Script (Python), line 5, in simple_tree - <PythonScript at /Examples/zpt_examples/simple_tree> - Line 5 Module ZTUtils.Zope, line 134, in cookieTree Module ZTUtils.Tree, line 296, in decodeExpansion IndexError: string index out of range
Isokangas, Erik HTC/DE/FRA wrote at 2003-4-4 08:44 +0200:
(sorry for the cross-posting with zope-forums.org, I didn't realise that it doesn't post directly to this forum)
I have been looking for a method to display a tree structure in ZPT, where the tree is built from simple, hierarchical data (rather than folderish objects).
The tree_menu example looked the most promising but I can't seem to get it to work. I'm getting the following error...
Request URL: http://linux3:8080/Examples/zpt_examples/tree_menu.pt Exception Type: IndexError Exception Value: string index out of range
A bug in "ZTUtils". I recently reported it to <http://collector.zope.org/Zope>" together with a receipe how to fix it. Dieter
participants (2)
-
Dieter Maurer -
Isokangas, Erik HTC/DE/FRA