Commit 13fcc136 authored by Richard Mansfield's avatar Richard Mansfield Committed by Nigel McNie
Browse files

Add ... when there is a jump in page numbers

parent 24b629a2
......@@ -30,8 +30,10 @@
{if $results.page > $results.prev}
<span class="search-results-page prev"><a href="?{$params}&amp;offset={$results.limit*$results.prev}">{str tag=prevpage}</a></span>
{/if}
{foreach from=$pagenumbers item=i}
{foreach from=$pagenumbers item=i name=pagenumbers}
{if !$smarty.foreach.pagenumbers.first && $prevpagenum < $i-1}...{/if}
<span class="search-results-page{if $i == $results.page} selected{/if}"><a href="?{$params}&amp;offset={$i*$results.limit}">{$i+1}</a></span>
{assign var='prevpagenum' value=$i}
{/foreach}
{if $results.page < $results.next}
<span class="search-results-page next"><a href="?{$params}&amp;offset={$results.limit*$results.next}">{str tag=nextpage}</a></span>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment