Hi, i've been working in a new project and i realize there is a
problem with pagination and SEO.
Supose i have a website www.example.com and in the main page there are
posts with pagination. I use Router to have the pagination URLs in the
way www.example.com/p-1, www.example.com/p-2, etc.
The problem is that www.example.com/p-1 and www.example.com have
exactly the same content, then Google and others could think that it's
The solution that i found is create a new helper that extends
PaginatorHelper and modify a few methods. In this helper there is a
new param in $options that indicate if the first or the last page of
our paginator has the "page" parameter. The new parameter name is
"no_page" and could have two values: first and last.
With "first" value, when we have a paginator, the links to the first
page are in the way www.example.com and NOT www.example.com/p-1.
If we use "last" as value of "no_page", the last page link of the
paginator will be www.example.com and NOT www.example.com/p-33, for
example. This is usefull when in the controller we use the option
"page" => "last" for the paginate method. Usefull to show the last
comments by default in a post for example.
This is the code: http://pastebin.com/0GW0nSsz
And an example of use:
echo $this->Pager->numbers(array('separator' => '', 'modulus' => 5,
'no_page' => 'first', 'first' => 1, 'last' => 1));
That's all. I don't know if there is another solution to this, and i
would like that a similar option will be included in the cakephp code.
PD. Sorry for my English.
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You received this message because you are subscribed to the Google Groups
To post to this group, send email to cake-php@xxxxxxxxxxxxxxxx
To unsubscribe from this group, send email to
cake-php+unsubscribe@xxxxxxxxxxxxxxxx For more options, visit this group at