This plugin makes it possible to split ExpressionEngine entries across multiple pages by using a {pagebreak} tag within a single entry field. Entries can be divided into an unlimited number of pages.
The SimplePagination features are almost an exact replica of those used by EE however some of the variable names do vary slightly to avoid conflicts. For additional info see the pagination details in the EE manual.
{exp:pagination}
{body}
{simplepaginate}
<div class="pagination">
<p class="status">Page {current_page} of {total_pages}</p>
{if previous_page}
<p class="prev_page">« <a href="{previous_auto_path}">Previous Page</a></p>
{/if}
{if next_page}
<p class="next_page"><a href="{next_auto_path}">Next Page</a> »</p>
{/if}
</div>
{/simplepaginate}
{/exp:pagination}
{exp:pagination}
{body}
{simplepaginate}
<p>Page {current_page} of {total_pages} pages {pagination_links}</p>
{/simplepaginate}
{/exp:pagination}
You can select where in your entry the pagination links appear with the ‘paginate’ parameter. Available settings are:
If you don’t set a value then the links will appear at the bottom by default.
If you would like to output an entire entry on a single page then simply replace the URL segment containing your page number with /print.
If you would prefer that the {pagination_links} variable generated links to every single page, rather than the nearest few, then you can now use the {all_pagination_links} variable.
You can specify the number of page-specific links that the {pagination_links} tag generates with the max_links parameter. By default this is set to 4 – i.e. the two previous pages and the two next ones. This is in addition to the usual first, previous, next and last page controls.
If you would prefer to use a different URI trigger for Simple Pagination then you can now do so via the uri_trigger parameter. For example, the following setting would generate URLs like /blog/entry/page_5 instead of /blog/entry/P5.
{exp:pagination uri_trigger="page_"}
This addon is released under the Creative Commons Attribution-No Derivative Works license.