mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-03-12 20:49:50 +00:00
"Fixes #3255, Adding link attributes to breadcrumb links in Html helper"
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6256 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
6fe54aa1d0
commit
9bed2fa6d7
1 changed files with 4 additions and 3 deletions
|
@ -160,9 +160,10 @@ class HtmlHelper extends AppHelper {
|
|||
*
|
||||
* @param string $name Text for link
|
||||
* @param string $link URL for link (if empty it won't be a link)
|
||||
* @param mixed $options Link attributes e.g. array('id'=>'selected')
|
||||
*/
|
||||
function addCrumb($name, $link = null) {
|
||||
$this->_crumbs[] = array($name, $link);
|
||||
function addCrumb($name, $link = null, $options = null) {
|
||||
$this->_crumbs[] = array($name, $link, $options);
|
||||
}
|
||||
/**
|
||||
* Returns a doctype string.
|
||||
|
@ -395,7 +396,7 @@ class HtmlHelper extends AppHelper {
|
|||
|
||||
foreach ($this->_crumbs as $crumb) {
|
||||
if (!empty($crumb[1])) {
|
||||
$out[] = $this->link($crumb[0], $crumb[1]);
|
||||
$out[] = $this->link($crumb[0], $crumb[1], $crumb[2]);
|
||||
} else {
|
||||
$out[] = $crumb[0];
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue