5.3.7.1 cols="..." attribute
Description: cols=
Keywords: albatross

###
5.3.7.1 `cols="..."` attribute

This attribute is used to format a sequence as multiple columns. The attribute value is an integer that specifies the number of columns.

Rather than evaluate the enclosed content once for each item in the sequence, the tag evaludates the content for each row of items in the sequence. The items in each row can be formatted by using an inner `<al-for>` tag.

By default the items flow down columns. To flow across columns you must use the `flow` (5.3.7.4)

For example:

    >>> import albatross
    >>> ctx = albatross.SimpleContext('.')
    >>> albatross.Template(ctx, '<magic>', '''
    ... <al-for iter="i" expr="range(15)" cols="4">
    ...  <al-for iter="c" expr="i.value()">
    ...   <al-value expr="' %2d' % c.value()">
    ...  </al-for whitespace>
    ... </al-for>
    ... ''').to_html(ctx)
    >>> ctx.flush_content()
      0  4  8 12
      1  5  9 13
      2  6 10 14
      3  7 11

Multi-column formatting does not support pagination.