这是我在newsses /链接index.ctp我的看法动作没有显示任何数据。 CakePHP的
$this->Html->link(__("Read more >>", TRUE), array('action'=>'view', $newss['Newsse']['title']));
,这我认为代码newsses_controller.php:
function view($title = NULL){
$this->set('title_for_layout', __('News & Event', true));
if (!$id) {
$this->Session->setFlash(__('Invalid News.', true), 'default', array('class' => 'error'));
$this->redirect(array('action'=>'index'));
}
$this->set('newsse', $this->Newsse->read(NULL,$title));
$this->set('newsses', $this->Newsse->find('all'));
}
,但开不显示任何东西, 我要让路线像: “newsses /查看/ 2” 到 “newsses /查看/ title_of_news”
请帮我....
只是注意,你能说出你的模型新闻和蛋糕应该理解,控制器也将是新闻 – JohnP 2011-05-03 08:44:25
确定..谢谢.... – Sindhu13 2011-05-05 04:09:58