user1327
user1327

Reputation: 948

CakePHP breadcrumbs configuration

I'm creating breadcrumbs for my CakePHP site with HtmlHelper and I need a last crumb to not be a link but have an ID. If I use

$this->Html->addCrumb($news['News']['title'],null, array('id' => 'crumbselected')); 

I get my crumb but it is simple text with no html attributes.

If instead of null I add a link everything works fine. But as I said – I need a last crumb to not be a link but have an ID.

Upvotes: 0

Views: 1416

Answers (1)

Hoff
Hoff

Reputation: 1772

The $options parameter is only used if you are outputting a link. You could try something like this instead:

$this->Html->addCrumb('<span id="crumbselected">' . $news['News']['title'] . '</span>',null);

Upvotes: 1

Related Questions