Help get this topic noticed by sharing it on Twitter, Facebook, or email.

How do I show First and Last links like expression engine natively does?

The pagination at the bottom of the expressionengine forums (http://expressionengine.com/forums/vi...) is what I would like to replicate, but with a padding of 3 links on each side of the current page link instead of 2.

The default EE pagination doesn't show the First link until the left most link is > 1, and it doesn't show the Last link until the right most link is < the total number of pages.

So I tried to incorporate that logic using the following:
http://pastebin.com/X5pW68BD

But that didn't work. Being on the first page gave these values:
abp_entry_from = 1, abp_entry_to = 1, abp_current_page_num = 0
And being on page 2 gave these values:
abp_entry_from = 2, abp_entry_to = 2, abp_current_page_num = 1
So I couldn't use abp_entry_from and abp_entry_to as I'd hoped.

What should I change in code to get this to work?
1 person has
this problem
+1
Reply