All pastes #536661 Raw Edit

Untitled

public text v1 · immutable
·published 2007-06-04 13:53 UTC
rendered paste body
{assign var=page_start value=$page-5}
{if $page_start < 0}
        {assign var=page_start value=0}
{/if}
{assign var=page_end value=$page_start+10}
{if $page_start>0}
        <a href="?{$url_params}&page=1">1</a> ...
{/if}
{if $page_end>$page_count}
        {assign var=page_end value=$page_count}
{/if}
{section loop=$page_end start=$page_start name=page}
        {if $page eq $smarty.section.page.index}
                {$smarty.section.page.index+1}
        {else}
                <a href="?{$url_params}&page={$smarty.section.page.index}">{$smarty.section.page.index+1}</a>
        {/if}
{/section}
{if $page_end<$page_count}
        {if $page_end!=$page_count-1}...{/if} <a href="?{$url_params}&page={$page_count-1}">{$page_count}</a>
{/if}