pagination

Used to output the pagination links for your Grid field. This tag uses the exact same pagination logic as regular ExpressionEngine pagination.

Parameters

field_id This parameter should be the integer value for the specific Grid field you want to paginate data from

entry_id The specific Channel Entry your Grid field resides in

channel The Channel short name to relate to a url_title parameter

url_title The url_title value for the entry you want (requires channel param)

limit How many Grid items you want per page

url_segment The number the pagination URL segment comes from. (optional, default is 3)

prefix The string you want to delineate your pagination from others. Defaults to G (for Grid)

Note that this tag uses the native Pagination tooling for ExpressionEngine, so all those paramters and tags work here too

Example
{exp:grid_pagination:pagination
    field_id='4'
    url_title="{segment_3}"
    channel="blog"
    limit="2"
    url_segment="4"
}
    {paginate}
        {pagination_links}
            {first_page}
                <a href="{pagination_url}" class="page-first">First Page</a>
            {/first_page}
            {previous_page}
                <a href="{pagination_url}" class="page-previous">Previous Page</a>
            {/previous_page}
            {page}
                <a href="{pagination_url}" class="page-{pagination_page_number} {if current_page}active{/if}">{pagination_page_number}</a>
            {/page}
            {next_page}
                <li><a href="{pagination_url}" class="page-next">Next Page</a>
            {/next_page}
            {last_page}
                <li><a href="{pagination_url}" class="page-last">Last Page</a>
            {/last_page}
        {/pagination_links}
    {/paginate}
{/exp:grid_pagination:pagination}