[Zope] overriding __str__ method?

Dieter Maurer dieter@handshake.de
Mon, 9 Oct 2000 12:43:07 +0200 (CEST)


Seb Bacon writes:
 > ... "manage_content" to enable editing all relevant aspects ....
 > Now I want a way to give the user access to this screen.  I could do a new
 > version of the folders tree view (manage_menu), but what I'd really like to
 > do is have a button next to each of these elements ("edit this") which calls
 > its manage_content method.  The button would only appear when the user was
 > authenticated / authorised.
 > 
 > My problem:
 > The only place I can think of doing this is in each object's __str__ method.
Why do you want to tinker with the "__str__" method for this reason?
"manage_menu" uses "<dtml-tree>". The tree tag provides you with
sufficient flexibility to show an additional button and
to make this conditional on the users roles.


Dieter