[Zope] Get attributes of a doc in another folder

Tim Cook tim@freepm.org
Wed, 09 May 2001 19:12:48 -0500


> 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