getPagingLinks($paging_limit)
getPagingLinks function used for pagination of the site.
Syntax:
{$archive->getPagingLinks($paging_limit)}
| Parameter |
Default Value |
Description |
Sample Value |
| $paging_limit |
0 |
Integer - initial value |
0 |
try to dump : {$archive->dump($
paging,true)}
| Index |
Value |
| page |
1 |
| first |
|
| prev |
|
| epsb |
|
| pages |
|
| epsf |
|
| next |
|
| last |
|
| total |
1 |
| start_record |
1 |
| last_record |
2 |
| shown_records |
2 |
| total_records |
2 |
<div id="pagination">
{assign var="paging" value=$archive->getPagingLinks()}
{if $paging.total!=0}
{if $paging.first}<a href="{$paging.prev}">◀ </a>
{else}◀ {/if}
{foreach item="page_link" key="page" from=$paging.pages}
{if $page == $paging.page}{$page}
{else}<a href="{$page_link}">{$page}</a>{/if}
{/foreach}
{if $paging.last}<a href="{$paging.next}"> ▶ </a>
{else} ▶ {/if}
{/if}
</div>
HTML Source Output:
<div class="pagination">
◀ 1 ▶
</div>
Browser Output: