Showing a list posts with pagination

This example shows the pagination links if needed.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<!-- page pagination -->
{paginate 
    type="array" 
    prev_text="&laquo;"
    next_text="&raquo;"
    assign_to="pagination"}
    
{if $pagination.total > 1}
<div>
    <ul class="pager">
    {foreach $pagination.data as $page}
        <li>{$page}</li>
    {/foreach}
    </ul>
</div>
{/if}
<!-- page pagination -->
{paginate 
    type="array" 
    prev_text="&laquo;"
    next_text="&raquo;"
    assign_to="pagination"}
    
{if $pagination.total > 1}
<div>
    <ul class="pager">
    {foreach $pagination.data as $page}
        <li>{$page}</li>
    {/foreach}
    </ul>
</div>
{/if}