修改新闻调用来源

This commit is contained in:
Li Jianxuan 2014-03-11 05:18:46 +00:00
parent 49cd4eb680
commit aa417932bc
2 changed files with 2 additions and 0 deletions

View File

@ -26,6 +26,7 @@ class IndexController extends AbstractActionController
{
$article = new \Sookon\Article\Lists;
$article->opt->limit = 10;
$article->opt->where = array(" cate.ptype='news' ");
$this->ViewModel->setVariable('articles',$article->fetchAll());
$article->opt->where = array(" cate.ptype='news' ");

View File

@ -44,6 +44,7 @@ class CategoryController extends AbstractActionController
$this->ViewModel->setTemplate('layout/article/news/index');
$list = new \Sookon\Article\Lists;
$list->opt->where = array(" cate.ptype='news' ");
view::addPaginator($list->fetchAll(),$this,10,'layout/article/pagination');
unset($list);