[Zope] accessing an CMF-Collector-Item variable using a string

Christoph Folberth folberth@decodon.com
Fri, 31 May 2002 17:30:45 +0200


Hello !!

Recently the following problem arised, and my unability to solve it,
made me feel desperate and unworthy to live.
Okay, enough with exaggerating, here comes the problem:

I have a list of strings (it's called tokens isn't it ?) which contains
the names of
some CollectorItems. The list is called 'collectorItems'
Let's assume there's a CMF-Collector installd under '/Coll' containing
about 300items.
Now i have to acces a variable of the given Items in CollectorItems
called status:

i tried the following:
<dtml-in collectorItems>
  <dtml-with "Coll">
    <dtml-with sequence-item>
      <dtml-var status>
    </dtml-with>
  </dtml-with>
</dtml-in>

it didn't work.


i also tried:
<dtml-in collectorItems>
  <dtml-with "Coll">
    <dtml-var "_['sequence-item'].status">
  </dtml-with>
</dtml-in>

again, it didn't work,

so i tried (as my last rescue, even without really knowing what i tried
to do):
<dtml-in collectorItems>
  <dtml-with "Coll">
    <dtml-with "_['sequence-item'].getObject()">
      <dtml-var status>
    </dtml-with>
  </dtml-with>
</dtml-in>

you guess it: again, IT DID NOT WORK !!

hopefully, there is s.o. out there to help me, thanx in advance,


Chris!