[Solar-talk] your pagerHelper at work

Jeff Surgeson solar at 3hex.com
Thu Aug 3 14:47:31 PDT 2006


> > Thought you might like to see your pager helper at work in the real
> > world, sorry it coulkd not be on a better site.
> > http://www.coptra-sa.com/index.php/news/list?page=2
>
> Really??? Oooooooh, lovely! Thanks for sharing! :-D
>
> And, well, I must remember that the logic inside the Sliding and
> Jumping adapters come from Pear::Pager. The whole idea came from
> there, btw, and from Paul's examples and feedback, and I hope credits
> are properly given. I think it is a refactored Pear::Pager, without
> the lots of insane properties like "how many spaces after first page
> link", "name of the span Y" etc., just examples, I don't remember,
> there are 50 properties or more I think. :-) Pear::Pager is great, but
> it could be much cleaner.

Thanks for that Rodrigo you are very generous, it is my first site that is 
completly Solar based and of course including your stuff. 
I changed your css so that I can center it as apposed to just floating 
left/right and then override some css attributes in the site specific style 
sheets to change background colors  etc

With regards "clean URL's" Paul went to all the trouble of designing Solar so 
we dont have to use url's like "news/list/?page=2" I even posted that he had 
made a mistake in his pagerHelper and promptly changed it, which was a few 
steps backwards.

I see that you have done the same in your code, I changed it as below so we 
get nice clean url's like news/list/2

protected function _buildActionLink($page_id, $text)
{
     $href = rtrim($this->_href, '/');
     //return $this->_view->action("$href?page=$page_id", $text);
     return $this->_view->action("$href/$page_id", $text);
}

-- 
Jeff Surgeson


More information about the solar-talk mailing list