[Zope] dynamically defined size attribute in a dtml-var tag?

Steve Alexander steve@cat-box.net
Fri, 12 May 2000 22:56:34 +0100


Chris Withers wrote:
> 
> josh on wrote:
> > <dtml-var position size=_.int(_['leng']) etc="">
> 
> Maybe you mean:
> <dtml-var position size="_.int(_['leng'])" etc="">
> 
> So size is treated as a python expression?
> 
> I could be totally wrong though :(

Fraid so :-)

The python code that implements the size attribute doesn't try to use
the aquisition or expression machinery on that attribute. The patch I
posted makes it use acquisition if atoi() fails on the value of size.

I didn't consider looking at adding evaluating expressions too.

That shouldn't be too hard though.

--
Steve Alexander
Software Engineer
Cat-Box limited