Re: Pager - how to show ONLY previous and next?

From: Date: Tue, 13 Mar 2007 23:48:21 +0000
Subject: Re: Pager - how to show ONLY previous and next?
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-26853@lists.php.net to get a copy of this message
On Mar 13, 2007, at 7:24 PM, Lorenzo Alberton wrote:
Charles Kline wrote:
I am using Pager but can't seem to figure out how to display ONLY the previous and next buttons without showing the page numbers between.
$links = $pager->getLinks(); echo $links['back']; echo $links['next']; http://pear.php.net/manual/en/package.html.pager.getlinks.php
Also, I am using images for these links, how do I add some javascript to the link so that I can use onmouseover() to have rollover effect?
I guess you could extend Pager_Sliding or Pager_Jumping and override the _renderLink() method with a custom implementation. You could add a parameter with the onmouseover() event you want to attach to the links...
Interesting. I set delta to -1 and it did it :) Hope that doesn't break anything, but so far looks good. - Charles

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