public function category() { $id = Q('get.id', 0, 'intval'); $article = Db::table('article')->where('cid', $id)->get(); $page = Page::row(5)->make(count($article)); $article = Db::table('article')->where('cid', $id)->limit(Page::limit())->get(); $field = Db::table('category')->where('id', $id)->first(); // p($field);exit; View::with('page', $page)->with('cms', $field)->with('article', $article); View::make($this->tpl . '/category.html'); }