[Zope] Access to DTML Document properties

Wiebe Kunst Wiebe Kunst" <wkunst@eunet.no
Thu, 11 Mar 1999 16:01:48 +0100


Thanks for a very fast reply, however it doesn't work. I'm still getting:
Error value: 'string' object has no attribute 'title'.

This is what I'm trying to do:
A DTML document (index_html) has a property art1 which has an ID for another
DTML document as value (type: string). In index_html I use: <!--#var
"_[_[('art1')]]"--> which renders the article. I can of course use
<!--#var title--> in the actual article, but I rather don't. So I'm still
banging my head in the wall after hours of trying to accomplish this. Can it
be a bug with DTML documents??

Best regards Wiebe Kunst


>On Thu, 11 Mar 1999, Wiebe Kunst wrote:
>
>> OK - I think I get it, but how do I "convert" a string to a reference to
an
>> object, so that I can call properties associated with the object (DTML
>> document). This should be possible, isn't it???
>
>> >_.getitem('foo') simply returns foo as found in the DTML namespace.
>> >
>
>Wiebe
>
>You can use something like:
>
><!--# var "_.getitem('foo',0).whateverproperty"--> (Is 0 the default?)
>
>_.getitem('foo',0) returns a reference to the object with id foo.
>
>Pavlos
>
>
>_______________________________________________
>Zope maillist  -  Zope@zope.org
>http://www.zope.org/mailman/listinfo/zope
>
>(For developer-specific issues, use the companion list,
>zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
>