PDA

View Full Version : Virtualpaginate - change display



piotrex41
10-17-2012, 07:18 PM
1) Script Title: Virtualpaginate

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/virtualpagination.htm

3) Describe problem:

Hello,
I need to change the navigation display in pagination, but but I have no idea how to do it. Please help me! :)

Now I have something like this:
<- 1 2 3 4 5 6 7 8 9 10 11 [12] 13 14 15 16 17 18 19 20 ->

But I need something like this:

<- 1 2 3 ... 11 [12] 13 ... 18 19 20 ->
Active first page:
<- [1] 2 3 ... 18 19 20 ->
Active last page:
<- 1 2 3 ... 18 19 [20] ->

[12] - active page

djr33
10-17-2012, 10:10 PM
You'd need to re-create the links from the script, and eliminate the links from the original script.

In order to recreate the links, you'd need to use either several complex sets of if statements, or three loops with if statements within them. You'd create the links to the first (or first few) page(s), then dots (if necessary), then you'd create the middle three links (but only if they weren't already included in the other groups!), then dots (if necessary), then finally the last page(s).

The logic is fairly complicated. Look up some tutorials on this to get the ideas.