Posy::Plugin::Paginate is a posy plugin to paginate multiple entries.
SYNOPSIS
@plugins = qw(Posy::Core
...
Posy::Plugin::Paginate
...
));
@actions = qw(init_params
...
select_entries
filter_by_date
sort_entries
filter_by_page
...
);
This plugin enables categories or chronological listsing with multiple entries in them, to be broken up into a number of pages, with previous and next links. Page length is defined by the 'num_entries' configuration setting; it will select entries depending on the 'page' ($paginate_param_name) parameter.
This provides the following variables that can be used within your flavour files.
flow_paginate_prev_link
Contains a link to the previous page, and is empty if this link is not valid.
flow_paginate_next_link
Contains a link to the next page, and is empty if this link is not valid.
flow_paginate_page_list
Contains links to all the pages, labelled by number. For example, if there are four total pages, this would contain, by default,
[1] [2] [3] [4]
See "paginate_pnum_prefix" for information on formatting this.
Cautions
This plugin does not work if you have a hybrid site (partially static-generated, partially dynamic) and also use the Posy::Plugin:;Canonical plugin, since the Canonical plugin will redirect your query. Also, if you have a hybrid site, don't forget to set the "paginate_url" config variable.
Activation
This plugin needs to be added to both the plugins list and the actions list.
In the actions list, 'filter_by_page' needs to go somewhere after sort_entries and before head_render, since the entries need to have been sorted, and the selection needs to be done before the head template is rendered, so that links could be put in the head part of the page if required.
Configuration
This expects configuration settings in the $self->{config} hash, which, in the default Posy setup, can be defined in the main "config" file in the config directory.
Product's homepage
Requirements:
· Perl