mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
Give PaginatorHelper's next/prev links the correct 'rel' attribute
It's a good idea to give links such as next/prev the 'rel' attribute. See the following pages for more information: http://www.w3.org/TR/html4/struct/links.html#edef-A http://www.w3.org/TR/html4/types.html#type-links Signed-off-by: mark_story <mark@mark-story.com>
This commit is contained in:
parent
5ce66d3031
commit
65394604a7
1 changed files with 8 additions and 0 deletions
|
@ -252,6 +252,10 @@ class PaginatorHelper extends AppHelper {
|
|||
* @return string A "previous" link or $disabledTitle text if the link is disabled.
|
||||
*/
|
||||
public function prev($title = '<< Previous', $options = array(), $disabledTitle = null, $disabledOptions = array()) {
|
||||
$defaults = array(
|
||||
'rel' => 'prev'
|
||||
);
|
||||
$options = array_merge($defaults, (array)$options);
|
||||
return $this->__pagingLink('Prev', $title, $options, $disabledTitle, $disabledOptions);
|
||||
}
|
||||
|
||||
|
@ -271,6 +275,10 @@ class PaginatorHelper extends AppHelper {
|
|||
* @return string A "next" link or or $disabledTitle text if the link is disabled.
|
||||
*/
|
||||
public function next($title = 'Next >>', $options = array(), $disabledTitle = null, $disabledOptions = array()) {
|
||||
$defaults = array(
|
||||
'rel' => 'next'
|
||||
);
|
||||
$options = array_merge($defaults, (array)$options);
|
||||
return $this->__pagingLink('Next', $title, $options, $disabledTitle, $disabledOptions);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue