[Zope-dev] Adding a property to a batch of objects ?
Holger Lehmann
holle@cat-serv.catworkx.de
Tue, 20 Mar 2001 17:10:23 +0100 (MET)
Thanks,
<dtml-call "_.getattr(this(),_['sequence-item']).manage_addProperty(...)">
worked just like a beauty. I thought I tried that one, but I must have
made a mistake :-)
- Holger
-----------------------------------
catWorkX GmbH Hamburg
Dipl.-Ing. Holger Lehmann
Stresemannstr. 364
22761 Hamburg
Tel : +49 40 890 646-0
Info: 0700 catWorkX
( 0700 22 89 67 59 )
Fax : +49 40 890 646-66
mailto:lehmann@catworkx.de
http://www.catworkx.de
http://www.catbridge.de
On Tue, 20 Mar 2001, Christian Scholz wrote:
> Hi!
>
> > I wanted to do sonething like this:
> > <dtml-in "objectIds(['DTML Document'])>
> > <dtml-call ....manage_addProperty('foo','bar','string')>
> > </dtml-in
>
> You might want to use <dtml-in "objectValues(['DTML Document'])">
> (or objectItems). then just say
>
> <dtml-call "manage_addProperty(...)">
>
> or you might change the ... to
>
> <dtml-call "_.getattr(this(),_['sequence-item']).manage_addProperty(...)">
>
> (hope this is right, have not tested it.)
>
> First form directly builds a list of the objects instead of the
> Ids, second form first looks up the id with _['sequence-item'] and
> then looks up the object with that id in the local object (your folder).
>
> Hope this helps..
>
> -- mr topf
>
> --
> COM.lounge http://comlounge.net/
> communication & design info@comlounge.net
>