RE: [Zope] Newbie question(s)
I want to count how many objects are contained in the current container object and then do something with that value, but I can't do the bit I need to do at the point of reading the count variable because I am in the wrong namespace.
I would try and do it like this (untested):
<dtml-call "REQUEST.set('itemCount', len(objectIds()))">
Regards
Max M
Thanks Max, that is certainly useful in this case. My query is really more general though, that was just an example, I need to know what the generally accepted method is for transferring values through the code (i.e between namespaces) IMHO as far as Zope documentation goes, the thing that is really lacking is a document introducing people to how to program in Zope, explaining the overlaps between Python and Zope/DTML and explaining the different syntaxes for calling variables, methods etc? There are a lot of references on specific functions, methods etc but no general overview. Maybe the forthcoming Zope book will address this better. I am also still looking for example code using manage_delObjects. Thanks, Alex ================================== Alex Bowyer IT Contractor, Logica Australasia Tel : +61 2 9202 8130 Fax : +61 2 9922 7466 E-mail : bowyera@logica.com WWW : http://www.logica.com.au/ ==================================
[Alex Bowyer] | My query is really more general though, that was just an example, I need to | know what the generally accepted method is for transferring values through | the code (i.e between namespaces) Unless I've misunderstood your problem, wouldn't <dtml-let> do the trick? (See DTML manual for more info). -Morten
From: Bowyer, Alex
My query is really more general though, that was just an example, I need to know what the generally accepted method is for transferring values through the code (i.e between namespaces)
I do believe that our ugly friend REQUEST.set() is the way to go here. I cannot remember having seen any other way of doing it. I expect that better days will be here with v.2.3 as we will get Python Methods, or whatever they are called.
I am also still looking for example code using manage_delObjects.
Sorry I cannot help there. Regards Max M
participants (3)
-
Bowyer, Alex -
Max M -
morten@esol.no