[Zope] Using batch processing in DTML

Ulrich Wisser liste at publisher.de
Sun Nov 30 16:49:20 EST 2003


Hello Mico,

you probably do not want to use several dtml-in loops.
Better use a counter to insert the line breaks.

<dtml-in allImages size=bs start=qs orphan=0 prefix=seq>
    <dtml-if seq_start>
        <table>
           <tr>
    </dtml-if>
    <dtml-if "seq_index > 0 and seq_index % 3 == 0">
        </tr><tr>
    </dtml-if>
    <td><dtml-var "seq_item.tag()"></td>
    <dtml-if seq_end>
        </tr>
        </table>
    </dtml-if>
</dtml-in>

with appropriate links for next and prev batches you should
get nice three columns tables, with as many rows as needed
for bs images.

Hope it helps

Ulrich

-- 

World Wide Web Publisher, Ulrich Wisser, Vallatorpsv.158, S-18752 Täby
http://www.publisher.de    Tel: +46-8-53460905   Fax: +46-8-534 609 06





More information about the Zope mailing list