這是我在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