Exemplo n.º 1
0
 public function index($id)
 {
     $newsModel = new NewsModel();
     $news = $newsModel->getNewsById($id);
     $this->assign('news', $news);
     $cateModel = new CategoryModel();
     $category = $cateModel->getCategory();
     $this->assign('cate', $category);
     $this->display('news');
     /*$this->redirect('index/index');*/
 }
Exemplo n.º 2
0
 public function index($id)
 {
     $pageModel = new NewsModel();
     $page = $pageModel->getPageByID($id);
     $this->assign('page', $page);
     $cateModel = new CategoryModel();
     $category = $cateModel->getCategory();
     $this->assign('cate', $category);
     $page_id = $id;
     $this->assign('page_id', $page_id);
     $this->display('page');
 }