I'm using the Yii Framework, with Bootstrap 3, and have noticed the default pagination behavior on the first and last pages is a little strange.
On page 2 of 3 the links look like:
< Prev | 1 | 2 | 3 | Next >
On the first page (page 1) the
< Prev link is hidden (not disabled or removed), but is capped to point at the first page (page 1) again.
On the last page (page 3) the
Next > link is hidden, but is capped to point at the last page (page 3).
The current page link also has the CSS
cursor:default but does allow clicks.
To help the crawlers I have added
rel="next/prev" to the relevant links.
I am tempted to remove the next and previous link entirely on the first and last page, respectively, and to disable the current page link (or even change it to a span). Would this be advisable? I would have thought this would make more sense to a crawler.
Is there a reason for the framework to include these hidden capped links on the page? It seems to have been deliberately coded in.
OK, so I just read up on it a bit more.
I thought the
rel="next/prev" was supposed to be added to the link (
<a>) tags in the body, not as it clearly states to additional link (
<link>) tags in the head.. which was particularly foolish of me.
This was the main source of my concern, but I guess the question is still valid, so I will let it stand!