BP: Added new theme option to include optional pagination. Thanks again to Jude for helping me with the code :-)
This commit is contained in:
@ -415,6 +415,28 @@
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
{if $template_option.show_pagination == 'true'}
|
||||
<div class="pagination">
|
||||
{eval var=$footer_currentPage-3 assign="paginationStartPage"}
|
||||
{if $footer_currentPage+3 > $footer_totalPages}
|
||||
{eval var=$footer_totalPages-6 assign="paginationStartPage"}
|
||||
{/if}
|
||||
{if $paginationStartPage <= 0}
|
||||
{assign var="paginationStartPage" value="1"}
|
||||
{/if}
|
||||
{section name=i start=$paginationStartPage loop=$footer_totalPages+1 max=7}
|
||||
{if $smarty.section.i.index != $footer_currentPage}
|
||||
<a href="{$smarty.section.i.index|string_format:$footer_pageLink}">{$smarty.section.i.index}</a>
|
||||
{else}
|
||||
<span id="thispage">{$smarty.section.i.index}</span>
|
||||
{/if}
|
||||
{/section}
|
||||
{if $smarty.section.i.index <= $footer_totalPages}
|
||||
… <a href="{$footer_totalPages|string_format:$footer_pageLink}">{$footer_totalPages}</a>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{serendipity_hookPlugin hook="entries_footer"}
|
||||
</div>
|
||||
<!-- ENTRIES END -->
|
||||
|
Reference in New Issue
Block a user