[Zope-CMF] what happened to Document???
Shane Hathaway
shane@digicool.com
Thu, 31 May 2001 20:50:48 -0400 (EDT)
On Thu, 31 May 2001, marc lindahl wrote:
> Hey, that was it!! I wonder why the behaviour changed? Some new fancy
> caching going on somewhere?
Believe it or not, that particular caching has been there for a long time
now. It has always bothered me but I didn't know why, and now I know why.
:-) This specific case could be corrected, though.
This happened because Document now has a __call__() method. It didn't
before.
> So what would I use for the if? Something ugly like "_.hasattr('bio')" ?
I would try <dtml-if expr="_.getitem('bio', 0)">. Ugly but it works.
ZPT, which is coming along very well, is designed from the start to
provide clean alternatives to expressions like that.
Shane