Page 1 of 1
All my pages instead of "next page - previous page"
Posted: Mon Nov 13, 2006 5:14 pm
by Toronto
Hello!
Is there a way to replace "next page" and "previous page" with all my pages(1,2,3...40..) that I have
to give user a chance "jump" between pages? (sorry for broke english)
Re: All my pages instead of "next page - previous page&
Posted: Tue Nov 14, 2006 10:32 am
by garvinhicking
Hi!
Yes, this should be possible. Edit your entries.tpl template file and search for something like this (depends on your theme):
Code: Select all
<div class='serendipity_entryFooter' style="text-align: center">
{if $footer_prev_page}
<a href="{$footer_prev_page}">« {$CONST.PREVIOUS_PAGE}</a>
{/if}
{if $footer_info}
({$footer_info})
{/if}
{if $footer_next_page}
<a href="{$footer_next_page}">» {$CONST.NEXT_PAGE}</a>
{/if}
replace that with:
Code: Select all
<div class='serendipity_entryFooter' style="text-align: center">
{section name=i loop=$footer_totalPages}
{if $smarty.section.i.index > 0}
<a href="{$footer_pageLink|@sprintf:$smarty.section.i.index}">{$smarty.section.i.index}</a>
{/if}
{/section}
</div>
HTH,
Garvin
Posted: Tue Nov 14, 2006 4:45 pm
by carl_galloway
hmmm, works perfectly, can we also list only 10 pages, and then provide a link to the next ten or previous ten?
EDIT: I thought I might try to figure out this for myself, but then ran into this
thread on the smarty forums. Turns out using smarty to do what I want to do leads to preformnace problems, but I
know Serendipity will have some way of doing this at the php layer and then feeding the results to the smarty

, even if it can only work on v1.1 it would still be really cool...
Posted: Tue Nov 14, 2006 5:53 pm
by Toronto
Thanks a lot!
