5.3.7.2 continue attribute
Description: continue attribute
Keywords: albatross

###
5.3.7.2 `continue` attribute

When paginating items via the `pagesize` (5.3.7.6) attribute, the iterator index will reset to the first index displayed on the page if you use an iterator more than once on the page. The `continue` attribute suppresses the sequence index reset causing the elements to flow on from the previous page.

For example:

    >>> import albatross
    >>> class Ctx(albatross.SimpleContext, albatross.HiddenFieldSessionMixin):
    ...     def __init__(self):
    ...         albatross.SimpleContext.__init__(self, '.')
    ...         albatross.HiddenFieldSessionMixin.__init__(self)
    ...
    >>> ctx = Ctx()
    >>> albatross.Template(ctx, '<magic>', '''
    ... A:<al-for iter="i" expr="range(500)" pagesize="20" whitespace="indent">
    ...  <al-value expr="i.value()">
    ... </al-for whitespace>
    ... B:<al-for iter="i" pagesize="10" whitespace="indent">
    ...  <al-value expr="i.value()">
    ... </al-for whitespace>
    ... C:<al-for iter="i" pagesize="15" continue whitespace="indent">
    ...  <al-value expr="i.value()">
    ... </al-for whitespace>
    ... ''').to_html(ctx)
    >>> ctx.flush_content()
    A: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
    B: 0 1 2 3 4 5 6 7 8 9
    C: 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24