calling manage_edit on several objects
OK, i managed to call manage_edit on the dtml-document SomeDoc and change it's included text: <dtml-call expr="SomeDoc.manage_edit('some text','')"> So, how can i do this if the id of my document is stored in another variable? e.g. <dtml-let doc_id="'SomeDoc'"> <dtml-call expr="???"> </dtml-let> Thanks Bernd -- -----Bernd Worsch-----------bernd.worsch@frontsite.de--------
Bernd Worsch wrote:
So, how can i do this if the id of my document is stored in another variable?
e.g.
<dtml-let doc_id="'SomeDoc'"> <dtml-call expr="???"> </dtml-let>
<dtml-with "_.getitem(doc_id)"> <dtml-call expr="???"> </dtml-with> HTH, -- Tim Cook, President - FreePM,Inc. http://www.FreePM.com Office: (901) 884-4126 ONLINE DEMO: http://www.freepm.org:8080/FreePM
On Mon, Mar 19, 2001 at 09:06:43AM -0600, Tim Cook wrote:
<dtml-with "_.getitem(doc_id)"> <dtml-call expr="???"> </dtml-with>
Ahh, getitem returns the value of a dtml variable: <dtml-with "_.getitem(doc_id)"> <dtml-call expr="manage_edit('some text','')"> </dtml-with> OK this works fine! What's more in <dtml-with "_.getitem(doc_id)"> <dtml-call expr="manage_edit(_.getitem('template',1),'')"> </dtml-with> another getitem inserts the rendered version of the dtml-method template into doc_id. Which is the same as calling template(_.None,_), isn't it. There is hope! Maybe i'll grok zope sometime :) Thanks again! Bernd -- -----Bernd Worsch-----------bernd.worsch@frontsite.de--------
participants (2)
-
Bernd Worsch -
Tim Cook