[Zope-dev] Want to test if User Equal to a Property

Jason Spisak webmaster@mtear.com
Fri, 12 Mar 1999 08:20:46 -0500


Zopsters,

I am attempting to tailor the way information gets viewed based on a
person's login.  When the user get's to the page described by the
following code, I would like the page to look one way if the 'owner'
property in the parent folder is equal to the user, and look the other
way if they are not equal.  The following code makes sense, but does not
work.

<!--#var standard_html_header-->
<!--#if expr="AUTHENTICATED_USER.getUserName()==_[owner]"-->
  <!--#var candidate_edit-->
<!--#else-->
  <!--#var candidate_noedit-->
<!--#/if-->
<!--#var standard_html_footer-->

The _[owner] property is stored as a string.  And
AUTHERNTICAED_USER.getUserName() returns a string if I'm not mistaken. 
The look-up for _[owner] without single quotes is because I'm not
looking up an object, but a property, right? The document is a DTML
Method.  Do I have to reference the Parent in the lookup?

All the best,

Jason Spisak
webmaster@mtear.com