[Zope] bad expression evaluation

Dieter Maurer dieter@handshake.de
Sat, 11 Nov 2000 14:24:25 +0100 (CET)


seb bacon writes:
 > I'm trying to compare two page titles, using this code:
 > 
 > <dtml-call "REQUEST.set('my_title',get_page_title)">
 > <dtml-in "PARENTS[1].objectValues(['Folder'])">
 >   &dtml-my_title; : &dtml-get_page_title
 >   <dtml-if "my_title!=get_page_title">
 >       <dtml-var title_or_id>
 >   </dtml-if>
 > </dtml-in>
 > 
 > Now I can see on the page that my_title and get_page_title are the same.  I have also tried comparing _.str(my_title) and _.str(get_page_title) just to make sure I was comparing strings.  But the if clause always evaluates true.  Any ideas?
Maybe, "get_page_title" is callable. In this case, e.g.,
"dtml-get_page_title;" is very different from "get_page_title".

Try to replace "get_page_title" by "_['get_page_title']" at
both places in your code.