The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Statocles::Page::List - A page presenting a list of other pages

VERSION

version 0.013

DESCRIPTION

A List page contains a set of other pages. These are frequently used for index pages.

ATTRIBUTES

pages

The pages that should be shown in this list.

next

The path to the next page in the pagination series.

prev

The path to the previous page in the pagination series.

template

The body template for this list. Should be a string or a Statocles::Template object.

METHODS

paginate

Build a paginated list of Statocles::Page::List objects.

Takes a list of key-value pairs with the following keys:

    path    - An sprintf format string to build the path, like '/page-%i.html'.
              Pages are indexed started at 1.
    index   - The special, unique path for the first page. Optional.
    pages   - The arrayref of Statocles::Page::Document objects to paginate.
    after   - The number of items per page. Defaults to 5.

Return a list of Statocles::Page::List objects in numerical order, the index page first (if any).

vars

Get the template variables for this page.

AUTHOR

Doug Bell <preaction@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2014 by Doug Bell.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.