{if $current_page!=1} {$first_page} {$previous_page} {/if}
{foreach key=row item=page from=$links} {$page.page} {/foreach} {__ text="z"} {$last_page2}
{if $current_page!=$last_page2} {$next_page} {$last_page} {/if}