[Zope] bug in dtml-in parametrics

M. Adam Kendall mak@kha0s.org
16 Aug 2001 08:55:05 -0400


Peter,
Since you are injecting these variables into the REQUEST,
they are already available by name without referencing
them explicitly in REQUEST.  So, you should be able to do
something as simple as:

<dtml-call "REQUEST.set('bstart',0)">
<dtml-call "REQUEST.set('bsize',3)">
Show the <dtml-var bsize> first items
<dtml-in sequence orphan="0" start=bstart size=bsize>

As far as I remember, the size attribute will not 
take a python expression.

On 16 Aug 2001 10:50:01 +0200, Peter Bengtsson wrote:
> I tried something like this:
> 
> <dtml-call "REQUEST.set('bstart',0)">
> <dtml-call "REQUEST.set('bsize',3)">
> Show the <dtml-var "REQUEST['bsize']"> first items
> <dtml-in sequence orphan="0" start="REQUEST['bstart']"
> size="REQUEST['bsize']">
> 
> But I got a KeyError on "REQUEST['bsize']" !!
> Not on REQUEST['bstart'] or <dtml-var "REQUEST['bsize']">
> 
> Here's the odd cure which works:
> 
> <dtml-call "REQUEST.set('bstart',0)">
> <dtml-call "REQUEST.set('bsize',3)">
> Show the <dtml-var "REQUEST['bsize']"> first items
> <dtml-let inches="REQUEST['bsize']">
> <dtml-in sequence orphan="0" start="REQUEST['bstart']" size=inches>
> 
> Has this been reported? Am I missing something about the size parameter?
> 
> Zope 2.3.0, python 1.5.2
> 
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> 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 )
> 
>