<snip>

> 
> yep.. well... this is quite a common question, all up.  It comes from people
> using shorthand, but not relaising it.  sometimes i wonder if this feature
> should be removed.
> 
> the line:
> 
> <dtml-if "id == 'index_html'">
> 
> is actually shorthand for:
> 
> <dtml-if expr="id == 'index_html'" >
> 
> which means your expression is handled as a python expression, not a DTML
> one.  In which case, you are comparing a function object (id)  with a string
> object ('index_html').
> 
> the simple fix is, of course, to 'call' the function....
> 
> <dtml-if "id() == 'index_html'">
> 
> should do what you're expecting.


Um, except that id is not always a method ;-(, hence the _['id'] idiom
(see discussion earlier this week)

Rik

_______________________________________________
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to