Forum OpenACS Q&A: Re: templating question - spanning <grid> items across table rows

This would work:

multirow create thumbnails item

multirow append thumbnails {<img src="image1">}
multirow append thumbnails {<img src="image2">}
multirow append thumbnails "Image 1 text"
multirow append thumbnails "Image 2 text"

multirow append thumbnails {<img src="image3">}
multirow append thumbnails {<img src="image4">}
multirow append thumbnails "Image 3 text"
multirow append thumbnails "Image 4 text"

Then:

<table>
<grid name=thumbnails cols=2 orientation=horizontal>
    <if @thumbnails.col@ eq 1>
        <tr valign=top>
    </if>

    <if @thumbnails.rownum@ le @thumbnails:rowcount@>
        <td>@thumbnails.item@</td>
    </if>

    <if @thumbnails.col@ eq 2>
        </tr>
    </if>
</grid>
</table>

Note the weird ordering in the creation of the multirow.  Or, you could remove the "orientation=horizontal" from the <grid> tag and order the multirow like this (might be weirder still):

multirow append thumbnails {<img src="image1">}
multirow append thumbnails "Image 1 text"
multirow append thumbnails {<img src="image3">}
multirow append thumbnails "Image 3 text"

multirow append thumbnails {<img src="image2">}
multirow append thumbnails "Image 2 text"
multirow append thumbnails {<img src="image4">}
multirow append thumbnails "Image 4 text"

Maybe there's a better way, but the above should definitely work.  Good luck...