Re: Pager_Sliding - better way to do this.

From: Date: Thu, 13 Feb 2003 11:55:17 +0000
Subject: Re: Pager_Sliding - better way to do this.
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-13218@lists.php.net to get a copy of this message
Lorenzo Alberton wrote:
I just got Pager_Sliding to work - very nice - thank you :-) the setting of $pager->links fits in really well with Flexy's way of doing things.. The only problem I ran into was that I couldnt work out how to stop the options messing around with my url - basically i want to specify exactly what url it should be adding as a prefix, rather than let it guess.. $this->pager = new Pager_Sliding( array(
      'totalItems' => $this->N,
      'perPage'    => $this->perPage,
      'append'     => true));
$this->pager->_url = $_SERVER["PHP_SELF"]."?pageID="; $this->pager->getLinks($this->session->page[$this->dbClass]); this is the rather nasty kludge I ended up with - setting the private _url , can you think of any better ideas. Regards Alan Well, _getLinksUrl() method is basically the same as in PEAR::Pager. Its purpose is to keep externally set $_GET (query-string) variables along the different pages. For instance, if your page/application needs an extra "order=ID" parameter, it doesn't get lost after the first page. I'm not sure I understood what you mean, though... maybe you're looking for "path" and "filename" options... Or is it a querystring issue?
yeah - I think it's mostly a query string thing - my query may include sort=colname, which is a reversing flag on the sort, being stored in a session, so if it gets included in the url it ends up flipping the sort order on each page view.. - which is why I was trying to override the use of it. - the other trouble was the path and fileName appear to get their preceding '/' stripped. so I got stuck both way rounds. :) Regards Alan
Please let me know... Regards, Lorenzo FYI: "append" defaults to "true", so you can avoid specifying that option... --- [Quipo ISP - Questa E-mail e' stata controllata dal programma Declude Virus] [Quipo ISP - This E-mail was scanned for viruses by Declude Virus]
-- Can you help out? Need Consulting Services or Know of a Job? http://www.akbkhome.com

« previous php.pear.dev (#13218) next »