diff --git a/app/index/controller/Index.php b/app/index/controller/Index.php index 699d48f..dea95c8 100644 --- a/app/index/controller/Index.php +++ b/app/index/controller/Index.php @@ -21,10 +21,11 @@ class Index extends Common { // $sub_category = []; + $current_category = []; if(!empty($this->request->param('category_id'))){ $sub_category = Category::where('pid',$this->request->param('category_id'))->where('type',3)->select(); - + $current_category = Category::find($this->request->param('category_id')); if(empty($this->request->param('sub_category_id'))){ $categorys = [$this->request->param('category_id')]; @@ -52,6 +53,7 @@ class Index extends Common $list_post = $model_post->paginate(); + View::assign('current_category',$current_category); View::assign('sub_category',$sub_category); View::assign('list_post',$list_post); diff --git a/view/admin/category/index.html b/view/admin/category/index.html index c51be21..e92b8b2 100644 --- a/view/admin/category/index.html +++ b/view/admin/category/index.html @@ -55,7 +55,7 @@
{$current_category.desc}+