Get attributes of a doc in another folder
Hi from a newbie, I got a dtml method at "/project" folder from which I want to add attributes to a dtml doc at "/project/folder/adocument" I tried to embed 2 consecutive <dtml-with> like following but it don't work. Did I miss something ? <dtml-with folder> <dtml-call "manage_addDTMLDocument(id=aname,title=prenom+' '+nom,file='')"> <dtml-with expr="aname"> <dtml-call "manage_addProperty(id='alias',value=alias,type='string')"> </dtml-with> </dtml-with> This adds the attribute to folder when I want it in adocument . I'm lost somewhere... TIA Gilles
Gilles Lenfant wrote:
Hi from a newbie,
I got a dtml method at "/project" folder from which I want to add attributes to a dtml doc at "/project/folder/adocument" I tried to embed 2 consecutive <dtml-with> like following but it don't work. Did I miss something ?
<dtml-with folder> <dtml-call "manage_addDTMLDocument(id=aname,title=prenom+' '+nom,file='')"> <dtml-with expr="aname"> <dtml-call "manage_addProperty(id='alias',value=alias,type='string')"> </dtml-with> </dtml-with>
This adds the attribute to folder when I want it in adocument .
TRY: <dtml-with folder> <dtml-call "manage_addDTMLDocument(id=aname,title=prenom+' '+nom,file='')"> <dtml-with "_.getitem(aname)"> <dtml-call "manage_addProperty(id='alias',value=alias,type='string')"> </dtml-with> </dtml-with> HTH, -- Tim Cook, President - FreePM,Inc. http://www.FreePM.com Office: (731) 884-4126 ONLINE DEMO: http://www.freepm.org:8080/FreePM
Guten Abend. * Gilles Lenfant <glenfant@bigfoot.com> [2001-05-09 20:16]:
<dtml-with folder> <dtml-call "manage_addDTMLDocument(id=aname,title=prenom+' '+nom,file='')"> <dtml-with expr="aname">
Here "aname" is a string. Imho there should be an error message if you do this to an dtml-with tag :-) You want the object with the id aname, so you have to get it: _.getitem(aname). Your dtml-with tag then looks like this: <dtml-with expr="_.getitem(aname)"> Cheers, Nils
participants (3)
-
Gilles Lenfant -
Nils Kassube -
Tim Cook