{* A generic pager for thelia back-office Parameters : $loop_ref: the name of the related loop $max_page_count : maximum number of pages to display $page_url : the URL of the page. The parameter page=x is appended to this URL. *} {* Prepare the URL so that the page=x parameter coumd be safely appended *} {if strpos($page_url, '?')} {$page_url="$page_url&"} {else} {$page_url="$page_url?"} {/if} {if !$page_param_name} {assign var="page_param_name" value="page"} {/if}

{pageloop rel=$loop_ref limit=$max_page_count} {$prev_page = $PREV} {$next_page = $NEXT} {$last_page = $LAST} {$has_prev = $CURRENT > 1} {$has_next = $CURRENT < $LAST} {$has_pages_after = $END < $LAST && $LAST > $max_page_count} {$has_pages_before = $START > 1} {if $PAGE == $START} {if $has_prev}
- «
- ‹
{if $has_pages_before}
- …
{/if} {else}
- «
- ‹
{/if} {/if} {if $PAGE != $CURRENT}
- {$PAGE}
{else}
- {$PAGE}
{/if} {if $PAGE == $END} {if $has_next} {if $has_pages_after}
- …
{/if}
- ›
- »
{else}
- ›
- »
{/if} {/if} {/pageloop}