ramaboo Posted July 28, 2009 Share Posted July 28, 2009 The default previous/next page stuff in WHMCS is ugly. Here is a simple fix. Create a new file called pagenav.tpl and place it somewhere. Add this: <ol class="clearfix"> {if $prevpage} <li class="page-previous"> <a href="/whmcs/clientarea.php?action={$action}&page={$prevpage}"><</a> </li> {/if} {section name=pages loop=$totalpages} {if $smarty.section.pages.iteration == $pagenumber} <li class="current page-{$smarty.section.pages.iteration}"> {$smarty.section.pages.iteration} </li> {else} <li class="page-{$smarty.section.pages.iteration}"> <a href="/whmcs/clientarea.php?action={$action}&page={$smarty.section.pages.iteration}"> {$smarty.section.pages.iteration} </a> </li> {/if} {/section} {if $nextpage} <li class="page-previous"> <a href="/whmcs/clientarea.php?action={$action}&page={$nextpage}">></a> </li> {/if} </ol> Now delete the previous/next table from your templates and add this: {assign var="action" value="emails"} include file="`$smarty.const.BASE_DIR`/templates/code/pagenav.tpl"} (change action and directories as needed). It will produce something like this: < 1 2 3 4 5 > Much nicer than just previous/next. Style to your hearts content. The current page LI has a class of current and each page as a class page-#. -David 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.