Re: Problem with Pager 2.1.0
| From: | Lorenzo Alberton | Date: | Mon, 12 Jan 2004 22:00:20 +0000 |
| Subject: | Re: Problem with Pager 2.1.0 | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-25018@lists.php.net to get a copy of this message | ||
On Mon, 12 Jan 2004 22:44:56 +0100, Stephan Wentz wrote:
> How do I add URL-Variables to the Pager?
> Of course it adds all $_GET-Variables, but I need to carry a few
> variables that come in through a POST-call first time.
what about setting them as $_GET variables before building the pager?
==========
if (isset($_POST['myvar']) {
$_GET['myvar'] = $_POST['myvar'];
}
$pager = new Pager($options);
==========
> I tried it with append=false, but it didn't work out.
>From the docs:
==========
append (bool): if true pageID is appended as GET value to the
URL - if false it is embedded in the URL according to "fileName" specs
==========
> After looking
> at the code I saw that in Pager_Common::_setOptions() in the block
> at line 867 in the else-part only $this->_path is written in $this-
> >_url, the _fileName is checked but never added.
it is added in _getPrevLink(), _getPageLink(), _getNextLink()
methods.
> And it throws a
> PEAR:Error, but in Pager_Sliding and _Jumping these aren't caught.
thanks, I will fix this one in the next release.
Best regards,
Lorenzo