Hi I'm trying to access properties from dtml. Something like <dtml-var FolderA.FolderB.ItemA.PropertyA> works just fine. Now I want to use that functionality in a loop (simmilar): <dtml-in "objectItems()"> <dtml-var "'FolderA.FolderB.' + _['sequence-item'] + '.PropertyA'"><br> </dtml-in> would give me: FolderA.FolderB.ItemA.PropertyA FolderA.FolderB.ItemB.PropertyA FolderA.FolderB.ItemC.PropertyA ... But I want the content so I write: <dtml-in "objectItems()"> <dtml-var "_['FolderA.FolderB.' + _['sequence-item'] + '.PropertyA']"><br> </dtml-in> And that gives me a nice error message, telling me, that the object does not exist. Any ideas on what I'm doing wrong? It's probably quite easy (and a standard problem) but I'm not able to see the soliution anymore! Thanx in advance! Oliver Erlewein SQS AG -- GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net
Hi Oliver, you can also access an subobject as object['subobjectname'].someMethod() Robert ----- Original Message ----- From: "Oliver Erlewein" <erlewein@gmx.de> To: <zope@zope.org> Sent: Tuesday, September 18, 2001 6:06 PM Subject: [Zope] Accessing Properties from dtml
Hi
I'm trying to access properties from dtml. Something like <dtml-var FolderA.FolderB.ItemA.PropertyA> works just fine. Now I want to use that functionality in a loop (simmilar):
<dtml-in "objectItems()"> <dtml-var "'FolderA.FolderB.' + _['sequence-item'] + '.PropertyA'"><br> </dtml-in>
would give me:
FolderA.FolderB.ItemA.PropertyA FolderA.FolderB.ItemB.PropertyA FolderA.FolderB.ItemC.PropertyA ...
But I want the content so I write: <dtml-in "objectItems()"> <dtml-var "_['FolderA.FolderB.' + _['sequence-item'] + '.PropertyA']"><br> </dtml-in>
And that gives me a nice error message, telling me, that the object does not exist. Any ideas on what I'm doing wrong? It's probably quite easy (and a standard problem) but I'm not able to see the soliution anymore!
Thanx in advance! Oliver Erlewein SQS AG
-- GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
participants (2)
-
Oliver Erlewein -
Robert Rottermann