[Zope-CMF] Beehive Book: Chapter 5

Chris Withers chrisw@nipltd.com
Mon, 28 May 2001 14:16:02 +0100


> to know more about. Please send your comments to:
>
> zope-ep@beehive.de

Okay, here goes :-)

When I printed this chapter out, Listing 05.03 lost all its indentation,
which was confusing to work out ;-)

Also, rather than having a paramter to the bg_color script (which means you
have to go through an change lots of DTML to a really horrible expression
(people here may already be familiar with my love of python expressions in
DTML ;-) ) why don't you have a parameterless bg_color script and insert the
following line at the top of it:

name = str(context.portal_membership.getAuthenticatedMember().getUserName())

...that way you keep the logic encapsulated in one place and not scattered
inbetween your presentation elements.

cheers,

Chris