1
0

BP: Added new theme option to include optional pagination. Thanks again to Jude for helping me with the code :-)

This commit is contained in:
Matthias Mees
2008-07-22 07:00:48 +00:00
parent 449bb30359
commit cf12fe3fa6
7 changed files with 35 additions and 0 deletions

View File

@ -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}
&hellip; <a href="{$footer_totalPages|string_format:$footer_pageLink}">{$footer_totalPages}</a>
{/if}
</div>
{/if}
{serendipity_hookPlugin hook="entries_footer"}
</div>
<!-- ENTRIES END -->