kennygadams
Programmer
I'm trying to create navigation feature similar to what tek-tips.net did with theirs:
Example: « ‹ 5 6 7 8 9 [10] 11 12 13 14 › »
You can view my progress here:
Currently it is displaying links to the all the results pages but I want it to display about four links before and after the current page that the visitor is viewing. What would be some good ways of doing that?
Kenny
Example: « ‹ 5 6 7 8 9 [10] 11 12 13 14 › »
You can view my progress here:
Currently it is displaying links to the all the results pages but I want it to display about four links before and after the current page that the visitor is viewing. What would be some good ways of doing that?
Code:
$number_of_pages = '3319';
$page_counter = '0';
while($page_counter < $number_of_pages){
$page_counter++;
if($page_counter == $current_page_number){
$navigation_text .= " <b>($page_counter)</b> ";
}
else{
$navigation_text .= " <a href='[URL unfurl="true"]http://www.jesterartsillustrations.com/cgi-bin/test-select.pl?page=$page_counter'>$page_counter</a>[/URL] ";
}
}
Kenny