Welcome Guest, Not a member yet? Register   Sign In
Pagination first link with suffix
#1

[eluser]Angilo[/eluser]
Hi,

the first link in pagination is not giving the right URL when you are using suffix.
For SEO purpose you want a link of this type:
"/products/overview/30/Watches/Men"

products = controller
overview = function
30 = pagination
Watches = filter on the page
Men = filter on the page

But since it is a filter, it's not always used. When you do use the filter, and you are not on the first page, the URL to the first page is wrong. The url will be
"/products/overview"

What you want is
"/products/overview/0/Watches/Men"

Why? Because else the users' filter will reset.

What to change?
Remove line 199 in system/libraries/pagination.php

Line 199:
Code:
$first_url = ($this->first_url == '') ? $this->base_url : $this->first_url;

Add this to line 195:
Code:
$first_url = $this->base_url.$this->prefix.(0 * $this->per_page).$this->suffix;

This will fix it. It will also fix the URL when you click at "1" or "<".


Messages In This Thread
Pagination first link with suffix - by El Forum - 01-10-2012, 08:56 AM
Pagination first link with suffix - by El Forum - 04-09-2012, 03:41 AM
Pagination first link with suffix - by El Forum - 04-09-2012, 07:45 AM
Pagination first link with suffix - by El Forum - 04-26-2012, 12:12 AM
Pagination first link with suffix - by El Forum - 05-29-2012, 10:57 AM



Theme © iAndrew 2016 - Forum software by © MyBB