Re: PEAR Pager only return first page

From: Date: Wed, 26 Jan 2005 12:30:21 +0000
Subject: Re: PEAR Pager only return first page
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-17167@lists.php.net to get a copy of this message
Hi, Roger Thomas wrote:
Hi, I edited example.php from Pager-2.2.5 to work with Smarty. There's no error but the script only gave me output for the 1st page. From page2 onwards, I only see the 'Number' table heading.
there's surely a problem with your template, not with Pager. I never used {section}s, so I can only suggest a working example with {foreach}: -- start of Smarty template -- {$links} <br /> <table border=1> <tr>
    <td>Number</td>
</tr> {if !empty($list)}
    {foreach item=listitem from=$list}
    <tr>
      <td>{$listitem.number}</td>
    </tr>
    {/foreach}
{else}
    <tr>
      <td>no record</td>
    </tr>
{/if} </table> -- end of Smarty template -- HTH -- Lorenzo Alberton http://pear.php.net/user/quipo

« previous php.pear.general (#17167) next »