Skip to content

Commit

Permalink
More Flexible Paginator
Browse files Browse the repository at this point in the history
Zurb foundation expects pagination links wrapped in anchor tags <a>
even on the current page. This seems like a safer approach.
  • Loading branch information
HaroldPutman committed Oct 1, 2012
1 parent b034d9d commit ed2f701
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/Cake/View/Helper/PaginatorHelper.php
Expand Up @@ -474,7 +474,7 @@ protected function _pagingLink($which, $title = null, $options = array(), $disab
return $this->Html->tag($tag, $this->link($title, $url, array_merge($options, compact('escape'))), compact('class'));
} else {
unset($options['rel']);
return $this->Html->tag($tag, $this->Html->tag('span', $title, compact('escape')), array_merge($options, compact('class')));
return $this->Html->tag($tag, '<a>'.h($title).'</a>', array_merge($options, compact('class')));
}
}

Expand Down Expand Up @@ -714,7 +714,7 @@ public function numbers($options = array()) {
if ($class) {
$currentClass .= ' ' . $class;
}
$out .= $this->Html->tag($tag, $this->Html->tag('span', $params['page']), array('class' => $currentClass));
$out .= $this->Html->tag($tag, '<a>'.$params['page'].'</a>', array('class' => $currentClass));
if ($i != $params['pageCount']) {
$out .= $separator;
}
Expand Down Expand Up @@ -747,7 +747,7 @@ public function numbers($options = array()) {
if ($class) {
$currentClass .= ' ' . $class;
}
$out .= $this->Html->tag($tag, $this->Html->tag('span',$i), array('class' => $currentClass));
$out .= $this->Html->tag($tag, "<a>$i</a>", array('class' => $currentClass));
} else {
$out .= $this->Html->tag($tag, $this->link($i, array('page' => $i), $options), compact('class'));
}
Expand Down

0 comments on commit ed2f701

Please sign in to comment.