[Zope] tino's <dtml-in> improvements

Tino Wildenhain tino@wildenhain.de
Fri, 23 Mar 2001 10:23:30 +0100


Joel Burton wrote:
> 
> At http://www.zope.org/Members/tino/in_tag_patch, member tino has a
> patched version of dtml-in that solves two problems:
> 
>   * having to use ugly syntax for python expressions using sequence vars
>     such as <dtml-if "_['sequence-item'] > 40">. The patch allows
>     <dtml-if "sequence_item > 40">
> 
>   * allowing you to set a prefix="books" attrib to <dtml-in>, so that
>     instead of sequence-item, you can reference books-item, or books-next,
>     etc. This is nice syntactic sugar, but especially nice for nested
>     <dtml-in> tags, allowing you to easily refer to seq. variables in
>     the outer dtml-loop, while in the inner loop.
> 
> However, the product isn't updated perfectly for 2.3--the sequence
> variables for '-number' aren't working (the less helpful '-index' ones
> are). It seems like patches like this need to get into the Zope core if
> they're going to make it in the long run.
> 
> Has anyone updated this for 2.3 -number vars?
> 
Thank you for reporting. I will check this over the weekend.

Regards
Tino