{if="$page_max > 1"} {if="$is_logged_in"} {$total="$linkcount"} {else} {if="empty($privateLinkcount)"} {$total="$linkcount"} {else} {$total=$linkcount - $privateLinkcount} {/if} {/if} {$from=($page_current - 1) * $links_per_page + 1} {$to=min($total, ($page_current - 1) * $links_per_page + $links_per_page)}