Page and Entry Pagination

The ability to have data span more than one page and to provide navigation between those pages is commonly referred to as "pagination". This could be something simple like having multiple pages of search results displaying results 1-10, 11-20, etc. or it could be the ability to break up a single article into multiple pages for easier reading; after all, who likes to read really long articles all on the same page?

ExpressionEngine has the ability to offer both types of pagination, which gives you an unprecedented level of flexibility. We'll cover the main varieties of pagination separately:

Weblog Entry and Comment Pagination

Pagination between different entries and comments allows you to limit the number of entries or comments shown on each page but still retain the ability to access all of them. Example:

{exp:weblog:entries weblog="news" orderby="date" sort="desc" limit="1" paginate="bottom"}

<h2>{title}</h2>

{summary}

{body}

{paginate}
<p>Page {current_page} of {total_pages} pages {pagination_links}</p>
{/paginate}

{/exp:weblog:entries}

Spanning a Weblog Entry Across Multiple Pages

You may also span an entry across several pages, allowing you to break up a long article into smaller chunks. Example:

{exp:weblog:entries weblog="news" paginate_type="field" paginate="bottom"}

<h3>{title}</h3>

{body}

{multi_field="page1|page2|page3|page4"}

<div>Last updated on {edit_date format='%M %d, %Y'} at {edit_date format='%h:%i %A'}<br />
</div>

{paginate}
<p>Page {current_page} of {total_pages} pages for this article {pagination_links}</p>
{/paginate}

{/exp:weblog:entries}