Reputation: 1179
This is setting a bread crumb but could be used on any helper i assume. I am trying to link to the current article that i am viewing in the bread crumb but not sure how to add the post ID after the view/ URL as i do with the news title before it?
$this->Html->addCrumb($news['News']['title'], array('controller' => 'news', 'action' => 'view/'$news['News']['id']));
Upvotes: 0
Views: 440
Reputation: 41605
I usually prefer the CakePHP format to do it :)
$this->Html->addCrumb(
$news['News']['title'], array(
'controller' => 'news',
'action' => 'view',
$news['News']['id']
)
);
Upvotes: 2
Reputation: 100205
You mean:
$this->Html->addCrumb(
$news['News']['title'], array(
'controller' => 'news',
'action' => 'view/' . $news['News']['id']
)
);
Upvotes: 1