diff --git a/application/index/controller/Content.php b/application/index/controller/Content.php index ac676046..0f123933 100644 --- a/application/index/controller/Content.php +++ b/application/index/controller/Content.php @@ -74,7 +74,7 @@ class Content extends Front { $order = "id desc"; } - $list = $this->model->where($map)->order($order)->paginate(15); + $list = $this->model->where($map)->order($order)->paginate($cate['list_row'] ? $cate['list_row'] : 15); $data = array( 'list' => $list, @@ -131,8 +131,14 @@ class Content extends Front { return $this->error("无此内容!"); } + $cate = array(); + if (isset($info['category_id'])) { + $cate = $this->getCategory($info['category_id']); + } + $data = array( 'info' => $info, + 'cate' => $cate ); if (isset($info['template_detail']) && $info['template_detail']) { $teamplate = 'content/' . $this->modelInfo['name'] . '/' . $info['template_detail'];