Hi If I dont want an entry for a folder to appear in a tree how can I skip it?? for eg. my folder struct: f1 - f11 - f22 - f33 No if I dont want f22 to appear like so: f1 - f11 - f33 in my tree what do I have to do?? Thanks. AM -- ================================================================== Aseem Mohanty Neurobehavioral Systems Inc, 828 San Pablo Ave, Albany, CA 94706 (R) 510 7696011 (M) 510 3014871 (O) 510 5279231 ================================================================== "I saw `cout' being shifted "Hello world" times to the left and stopped right there!!" -- Steve Gonedes ==================================================================
I was doing that but unsuccessfully This is my filtering function: root = context.pres_docs_storage obs = root.objectValues() ob_list = [] for ob in obs: if ob.getId() != 'examples': ob_list.append(ob) return ob_list This works too: the root is a LocalFS instance, and this function returns a list of - <File ObjectWrapper instance at 8C8B4B8> My tree method: <dtml-let root="pres_docs_storage"> <dtml-tree name=root branches_expr="filter_tree_items()" nowrap single> <dtml-var "pres_docs_get_url( getId(),hasChildNodes(), _['tree-item-url'], _['tree-item-expanded'])"> </dtml-tree> </dtml-let> If I do this and click on test: it kind of hangs ie my browser just keeps churning but never renders the page. My original tree method: <dtml-let root="pres_docs_storage"> <dtml-tree name=root branches=objectValues nowrap single> <dtml-var "pres_docs_get_url( getId(),hasChildNodes(), _['tree-item-url'], _['tree-item-expanded'])"> </dtml-tree> </dtml-let> This on the other hand works perfectly. What could be going wrong between the function call and the rendering?? TIA AM Dieter Maurer wrote:
AM writes:
If I dont want an entry for a folder to appear in a tree how can I skip it?? You look in the documentation for "branches_expr"...
Dieter
.
-- ================================================================== Aseem Mohanty Neurobehavioral Systems Inc, 828 San Pablo Ave, Albany, CA 94706 (R) 510 7696011 (M) 510 3014871 (O) 510 5279231 ================================================================== "I saw `cout' being shifted "Hello world" times to the left and stopped right there!!" -- Steve Gonedes ==================================================================
AM writes:
I was doing that but unsuccessfully This is my filtering function:
root = context.pres_docs_storage
obs = root.objectValues() Use "obs = context.objectValues()"
Otherwise, you will probably start at the same document "pres_docs_storage" at each hierarchical level.
ob_list = [] for ob in obs: if ob.getId() != 'examples': ob_list.append(ob)
return ob_list ....
If I do this and click on test: it kind of hangs ie my browser just keeps churning but never renders the page. The above problem does not explain why your browser waits forever.
It would only explain that your tree shows the same information on all levels. I do not know why your browser does not render the page. Check, whether Zope is still working on the request (go to "Control_Panel -> Debug Information", look at the bottum). Dieter
Dieter Maurer wrote:
If I do this and click on test: it kind of hangs ie my browser just keeps churning but never renders the page. The above problem does not explain why your browser waits forever.
This sounds suspiciously like the method returns nothing (0 or an empty string) when you hit the tests tab. Is that a possibility? cheers, Chris
participants (3)
-
AM -
Chris Withers -
Dieter Maurer