[Zope-CMF] what happened to Document???

marc lindahl marc@bowery.com
Thu, 31 May 2001 21:03:06 -0400


> From: Shane Hathaway <shane@digicool.com>
> 
> 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.

Actually, the caching seems like a good thing, as long as it caches the same
thing -- in other words, doesn't cache expr="bio" and use it for bio.

> 
> This happened because Document now has a __call__() method.  It didn't
> before.
> 

Yecch - why does it need a __call__ when it can rely on zope's default
index_html behavior?

This seems like it will break lots of code...  I'm used to <dtml-if thing>
syntax, and the reason is because I gleaned the technique from reams of
documentation, howtos, and inspection of DC's dtml code!

>> 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.

Speaking of ZPT, someone should really check out the link that Geir posted,
and the references it makes.  It seems like some hard-won wisdom about CSS
that would go far in cleaning up the default stuff in CMF and making it more
easily manageable.  (http://www.alistapart.com/stories/journey/5.html)