[Zope] newbie question about DTML IF

Myles Byrne wisemanb@ihug.com.au
24 Oct 2001 21:16:30 +1000


I'm trying to add a statement to my page that greets each user with a
different statement, but i can't seem to work out how to do it.

Just from reading some of the zope documentation i've tried:

<dtml-if expr="AUTHENTICATED_USER = bob">
bob likes to eat fish
</dtml-if>

and

<dtml-if expr="str(GetUser()) = bob">
bob likes to eat fish
</dtml-if>

Both of these are obviously very wrong, in the first case i thought it
might have something to do with calling an object and trying to compare
it to a string so in the second one i tried rendering it into a string,
but evedently this isn't the correct way to do that. I'm new to both
zope and python and I have a feeling I have the whole thing totally
wrong. 

Would it be better to do this in python some how and store each users
greeting in a dtml document?

any suggestions would be greatly appreciated

Thanks

Myles