[Zope] How to use getitem in this situation

Heimo Laukkanen huima@fountainpark.org
Sun, 03 Mar 2002 02:12:55 +0200


Hi all,

had just a funny situation to which I didin't quite get the solution I
wanted.

My folder structure:

root 
  -- happenings
      + 2002-01-01 ( file )
      + 2002-01-02 ( file )

Now in the root folder I had a dtml-document, in which a script wanted
to fetch a title of one of those files in happenings folder. Id of the
file was constructed into a variable x.

Of course I solved the problem with <dtml-with happening> <dtml-var
_.getitem(x).title></dtml-with>, but was left wondering was there other
ways of doing this?

In Python or PythonScript I would have needed getattr, rigth? 

-huima