Forum OpenACS Q&A: template::multirow foreach

Collapse
Posted by Lars Pind on
I've long missed the ability to loop over a manually created
multirow and do some computation. Well, now you can. (Or, at least
you can when Don gets the patch into the tree.)

I've implemented

template::multirow foreach foo {
    ...
}

Which can be combined with calling

template::multirow extend foo col1 col2 ...

first, to add a few columns to the multirow.

There's not much to say. It does the obvious thing: Loop over the
multirow, setting local variables, executing the code block, and
pulling local vars back into the array.