Noticed the following change in Zope's behavior. Imagine the following: Folder, id 'test' TinyTable, id 'data: columns 'name', 'pos' a single row of data, for simplicity: "one", "first" DTML Document or Method, id "show" If show contains: <!--#if data--> <!--#in "data(name='one')"--> <!--#var pos--> <!--#/in--> <!--#/if--> Then Zope 1.10.2 is unable to find data's __call__. 1.9.0 worked fine. The following variations, which should be equivalent in this case, all work. Omitting the if works: <!--#in "data(name='one')"--> <!--#var pos--> <!--#/in--> Omitting the query and just using the whole dat TinyTable works: <!--#if data--> <!--#in data--> <!--#var pos--> <!--#/in--> <!--#/if--> Forcing acquisition of data works: <!--#if data--> <!--#in "test.data(name='one')"--> <!--#var pos--> <!--#/in--> <!--#/if--> It's as though within an #if, the name data is getting bound to some other object (probably the results of data(), since it can be iterated in the second working example above). Is this change in behavior intentional?
Hello, I am using the newest ZServer under linux, together with Zope-1.10.2-linux2-x86, and it appears that I cannot correctly write to the ZServer. Whenever I publish something via netscape publish or even ftp, it creates a standard 'index-html' file of lentgh 144 bytes, independent from the original content. How can I make ftp or NS_Publishing running correctly? Thanks, Christian
I've just started messing around with the tree tag. I'm looking for a way to keep it from recursing through subdiretcories. Ie... I have call the tree tag like so... <!--#tree expr="PARENTS[-1]" branches_expr="objectValues(['Folder'])"--> <!--#unless hidden--> <A HREF="<!--#var tree-item-url-->"> <!--#var title_or_id--> </A> <!--#/unless--> <!--#/tree--> And have a basic folder structure like so... +foo +bar -file I have the 'hidden' property set on 'foo', yet when I view the tree tag I get a '+' (no title or id). If I delete the bar folder, the tree tag code returns nothing (as I want). Is there a way to shortcut the recursive nature of the tree tag to keep it from returning the '+' when it contains subfolders? Thanks, --- John Eikenberry [jae@kavi.com] ______________________________________________________________ "A society that will trade a little liberty for a little order will deserve neither and lose both." --B. Franklin
Hi John, The way I do this is to set up an external method containing: def publicObjects(self): "return only public sub-documents and folders" result=[] for object in self.objectValues(['Folder']): if hasattr(object,'hidden') and not object.hidden: result.append(object) return result and then make your tree tag use this method with: <!--#tree branches="publicObjects"--> [...] <!--#/tree--> Hope that helps, Martin John Eikenberry wrote:
I've just started messing around with the tree tag. I'm looking for a way to keep it from recursing through subdiretcories. Ie...
I have call the tree tag like so...
<!--#tree expr="PARENTS[-1]" branches_expr="objectValues(['Folder'])"--> <!--#unless hidden--> <A HREF="<!--#var tree-item-url-->"> <!--#var title_or_id--> </A> <!--#/unless--> <!--#/tree-->
And have a basic folder structure like so...
+foo +bar -file
I have the 'hidden' property set on 'foo', yet when I view the tree tag I get a '+' (no title or id). If I delete the bar folder, the tree tag code returns nothing (as I want).
Is there a way to shortcut the recursive nature of the tree tag to keep it from returning the '+' when it contains subfolders?
Thanks,
---
John Eikenberry [jae@kavi.com] ______________________________________________________________ "A society that will trade a little liberty for a little order will deserve neither and lose both." --B. Franklin
-- ### Martin Dougiamas -- Internet Agent is == i see ### Centre for Educational Advancement ### http://cea.curtin.edu/staff/martin
participants (4)
-
Christian Sonntag -
John Eikenberry -
Martin Dougiamas -
tsarnaļ¼ endicor.com