why doesn't this work with tree tag
In the depths of a tree tag I want to pick up a property of the "current" object without acquisition if the property isn't present. This code seems to work when used not in a tree tag but when its in a tree tag it still finds the property from higher up in the acquisition space. <dtml-with this only> <dtml-if rubbish> <dtml-var rubbish> </dtml-if> </dtml-with> What gives? How can I do this? The version below doesn't fall over if the property isn't present on that object, it just finds it by acq. Code below should fall over but doesn't ---------------------------------- <dtml-tree expr="lists" branches=objectValues sort=order> <dtml-if "meta_type=='Folder'"> <dtml-var title_or_id> <dtml-else> <dtml-if "kind=='discussion'"> <A HREF="<dtml-var listURL>"> <dtml-var title_or_id></A> <dtml-else> <dtml-with this only> <dtml-var rubbish> </dtml-with> </dtml-if> </dtml-if> <dtml-if listinfo> (<dtml-var listinfo>) </dtml-if> </dtml-tree> Andy sorry for so many q's. I promise to give back when I can. -- ------------------------------------------------- Andy Heath a.k.heath@open.ac.uk The Open University +44 (0) 114 2885738
I have a page that has the same SQL Method called a few times.... <dtml-in sqlMethod query=start_query> Do some stuff </dtml-in> <dtml-in sqlMethod query=start_query> Do some more stuff </dtml-in> <dtml-in sqlMethod query=start_query> Do some more stuff </dtml-in> Does anyone know the inner working well enough to tell me whether or not Zope actually makes two separate calls to the database or whether it makes one caches it and uses the results twice? If you know and would like to expand on how Zope deals with caching SQL data that would be great I am trying to optimize my Zope installation and don't want to tax the database. Thanks, JMA
J, In the advanced tab on the edit page of a SQL Method there is a entry box for caching information. You could start by looking there. HTH Phil phil.harris@zope.co.uk ----- Original Message ----- From: <Jatwood@bwanazulia.com> To: <zope@zope.org> Sent: Thursday, March 02, 2000 1:13 PM Subject: [Zope] SQL Methods being called more than once
I have a page that has the same SQL Method called a few times....
<dtml-in sqlMethod query=start_query> Do some stuff </dtml-in>
<dtml-in sqlMethod query=start_query> Do some more stuff </dtml-in>
<dtml-in sqlMethod query=start_query> Do some more stuff </dtml-in>
Does anyone know the inner working well enough to tell me whether or not Zope actually makes two separate calls to the database or whether it makes one caches it and uses the results twice?
If you know and would like to expand on how Zope deals with caching SQL data that would be great I am trying to optimize my Zope installation and don't want to tax the database.
Thanks, JMA
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
At 8:13 am -0500 2/3/00, Jatwood@bwanazulia.com wrote:
I have a page that has the same SQL Method called a few times....
<dtml-in sqlMethod query=start_query> Do some stuff </dtml-in>
<dtml-in sqlMethod query=start_query> Do some more stuff </dtml-in>
<dtml-in sqlMethod query=start_query> Do some more stuff </dtml-in>
Does anyone know the inner working well enough to tell me whether or not Zope actually makes two separate calls to the database or whether it makes one caches it and uses the results twice?
If you know and would like to expand on how Zope deals with caching SQL data that would be great I am trying to optimize my Zope installation and don't want to tax the database.
I posted a message about this this morning. In effect, yes you can use caching and it is veery fast (one second and subsequent renders). For your document, I think you'll find it will speed up by a factor of how many times the ZSQL method is called... tone. ps it's the 'Advanced' tag. Put something in the 'cache results for n seconds' box ------ Dr Tony McDonald, FMCC, Networked Learning Environments Project http://nle.ncl.ac.uk/ The Medical School, Newcastle University Tel: +44 191 222 5888 Fingerprint: 3450 876D FA41 B926 D3DD F8C3 F2D0 C3B9 8B38 18A2
participants (4)
-
Andy Heath -
Jatwoodï¼ bwanazulia.com -
Phil Harris -
Tony McDonald