pagination header for dynamic website
Posted: Wed Sep 02, 2015 4:20 am
Greetings,
I'm really new in programming stuffs, you help is more than welcome.
I have a concern and I'm still not able to sort it out until now.
I'd like to create seo pagination for website's results page, and have it into the html header.
The problem is, I'm not really able to do it as the previous developer choose to use javascript: void(0) instead. I'd like to change it.
Here is the current code:
The output of the page is:
123 Next or Previous 12345 Next. (While having the cursor on the pagination, the shows javascript:void(0))
However, I'm facing some issues with my javascript, so, would prefer to avoid that and to have a proper link on the pagination.
I'd like to better have some thing like: http:www.example/cars/page1, http:www.example/cars/page2, http:www.example/cars/page3, ... http:www.example/cars/page10 (last page) instead.
Also, regarding the header, I'd like to use the pagination for some seo purposes and have:
Thanks in advance for your time and your contribution.
I'm really new in programming stuffs, you help is more than welcome.
I have a concern and I'm still not able to sort it out until now.
I'd like to create seo pagination for website's results page, and have it into the html header.
The problem is, I'm not really able to do it as the previous developer choose to use javascript: void(0) instead. I'd like to change it.
Here is the current code:
Code: Select all
$total_page = ceil($total/$perpage);
$startpoint = ($page * $perpage) - $perpage;
$lim = 5;
$link = 'javascript:void(0);';
$pdata = '<div class="pg2_pagnation" style="float:right">'.pagination_front($page,$total_page,$link,$lim).'</div>';123 Next or Previous 12345 Next. (While having the cursor on the pagination, the shows javascript:void(0))
However, I'm facing some issues with my javascript, so, would prefer to avoid that and to have a proper link on the pagination.
I'd like to better have some thing like: http:www.example/cars/page1, http:www.example/cars/page2, http:www.example/cars/page3, ... http:www.example/cars/page10 (last page) instead.
Also, regarding the header, I'd like to use the pagination for some seo purposes and have:
Code: Select all
<link rel="canonical" href="https://www.example.com/page1">
<link rel="prev" href="https://www.example.com/page2">
<link rel="next" href="https://www.example.com/page4">Thanks in advance for your time and your contribution.