/** * module news action_showone() * * Show one single news with comments */ public function action_showone($params) { // Get Render Engine $view = $this->getView(); #Clansuite_Debug::firebug($params); $news_id = (int) $params['id']; #(int) $this->request->getParameterFromGet('id'); if ($news_id === null) { $news_id = 1; } // fetch the news to update by news_id // $news = $this->getModel()->find($data['news_id']); $news = $this->getModel()->fetchSingleNews($news_id); Clansuite_Debug::printR($news); // if a news was found if (!empty($news) && is_array($news)) { // Set Pagetitle and Breadcrumbs Clansuite_Breadcrumb::replace(_('Show News'), '/news/show', 1); Clansuite_Breadcrumb::add(_('Viewing Single News: ') . $news['news_title'], '/index.php?mod=news&action=show'); $view->assign('news', $news); } else { // no news found for this id $view->setTemplate('newsnotfound.tpl'); } // Prepare Output $this->display(); }