[Zope] Problem accessing property value

David Riggs driggs@asset.com
Thu, 03 Aug 2000 17:08:17 -0400


This is a problem I'm running into using Zope 2.1.6 and PTK 0.7.1 on an
NT machine...I plan on upgrading both as soon as the 2.2.1 bug fix is
released...I believe the problem is just a syntax one...

I'm running into a snag trying to access the value of a property I've
assigned to an instance of a ZClass...specifically, I've created a
ZClass of meta-type Customize, and created an instance (also called
Customize for simplicity) in each member's home folder. [for reference
sake, PTK creates a folder in the path
/ZopeRoot/PortalRoot/Members/UserName for each member] The instance has
a long list of properties that I'd like to access and use as
customization settings for each individual user.

Calling the property like this...
      <dtml-var
"AUTHENTICATED_USER.getHomeUrl()+'/Customize.some_property'">
Yields the following string literal (which isn't what I need)
        http://host:8080/Portal/Members/UserName/Customize.some_property

And calling it like so...
     <dtml-var
"_(AUTHENTICATED_USER.getHomeUrl()+'/Customize.some_property')">
Gives me this weird string (definitely not what I want)
      <DictInstance object at 134fdc0>
Where the hex number varies between 11xxxxx - 13xxxxx each time I render

it.

I've tried calling the Customize method like this
     <dtml-var "Members.UserName.Customize.some_property">
And I get the value I need, but this way I'm hard coding the user's name

into the path, where I want it to not be user specific.

I've tried a few times with getAttribute and getProperty, but can't seem

to get the syntax correct...If any Zope Masters could offer a hand, it'd

be GREATLY appreciated!

Thanks,
David Riggs