BP: Added new theme option to include optional pagination. Thanks again to Jude for helping me with the code :-)
This commit is contained in:
parent
449bb30359
commit
cf12fe3fa6
@ -51,6 +51,7 @@
|
||||
@define('PREV_NEXT_TEXT','Nur Text');
|
||||
@define('PREV_NEXT_TEXT_ICON','Text und Icon');
|
||||
@define('PREV_NEXT_ICON','Nur Icon');
|
||||
@define('SHOW_PAGINATION','Zusätzliche Seitennummerierung (Pagination) anzeigen');
|
||||
// coComment support
|
||||
@define('COCOMMENT_ACTIVE','coComment (http://www.cocomment.com) in Kommentarformulare einbinden');
|
||||
// Counter code
|
||||
|
@ -51,6 +51,7 @@
|
||||
@define('PREV_NEXT_TEXT','Text only');
|
||||
@define('PREV_NEXT_TEXT_ICON','Text and icon');
|
||||
@define('PREV_NEXT_ICON','Icon only');
|
||||
@define('SHOW_PAGINATION','Show additional page numbers (pagination)');
|
||||
// coComment support
|
||||
@define('COCOMMENT_ACTIVE','Integrate coComment (http://www.cocomment.com) into comment form');
|
||||
// Counter code
|
||||
|
@ -207,6 +207,12 @@ $template_config = array(
|
||||
'texticon' => PREV_NEXT_TEXT_ICON,
|
||||
'icon' => PREV_NEXT_ICON)
|
||||
),
|
||||
array(
|
||||
'var' => 'show_pagination',
|
||||
'name' => SHOW_PAGINATION,
|
||||
'type' => 'boolean',
|
||||
'default' => 'false',
|
||||
),
|
||||
array(
|
||||
'var' => 'counter_code',
|
||||
'name' => COUNTER_CODE,
|
||||
|
@ -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 -->
|
||||
|
@ -51,6 +51,7 @@
|
||||
@define('PREV_NEXT_TEXT','Nur Text');
|
||||
@define('PREV_NEXT_TEXT_ICON','Text und Icon');
|
||||
@define('PREV_NEXT_ICON','Nur Icon');
|
||||
@define('SHOW_PAGINATION','Zusätzliche Seitennummerierung (Pagination) anzeigen');
|
||||
// coComment support
|
||||
@define('COCOMMENT_ACTIVE','coComment (http://www.cocomment.com) in Kommentarformulare einbinden');
|
||||
// Counter code
|
||||
|
@ -51,6 +51,7 @@
|
||||
@define('PREV_NEXT_TEXT','Text only');
|
||||
@define('PREV_NEXT_TEXT_ICON','Text and icon');
|
||||
@define('PREV_NEXT_ICON','Icon only');
|
||||
@define('SHOW_PAGINATION','Show additional page numbers (pagination)');
|
||||
// coComment support
|
||||
@define('COCOMMENT_ACTIVE','Integrate coComment (http://www.cocomment.com) into comment form');
|
||||
// Counter code
|
||||
|
@ -60,6 +60,9 @@ abbr, acronym, .help{
|
||||
background: #ddd;
|
||||
}
|
||||
|
||||
/* optional pagination in the footer */
|
||||
.pagination { padding: 0.5em 0; }
|
||||
|
||||
/* optional nav links in the footer */
|
||||
#footer_sitenav {
|
||||
clear: both;
|
||||
|
Loading…
x
Reference in New Issue
Block a user