解决方案 »

  1.   

    无极限分类你已经弄好了,添加具体的新闻内容,比无极限分类还简单的啊!
    分类ID 保存到新闻 中的分类ID字段里就好了!
      

  2.   

    给你个我这边的无极限分类  `brand_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '1-1000为品牌1000以后为品牌下产品分类',
      `name` varchar(255) NOT NULL COMMENT '名称',
      `add_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间',
      `parent_id` int(5) unsigned NOT NULL DEFAULT '0' COMMENT '所属父栏目ID',
      `arr_parent_id` varchar(255) NOT NULL DEFAULT '' COMMENT '所有父栏目',
      `arr_child_id` text NOT NULL COMMENT '所有子栏目',
      `is_child` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否有子栏目',
      `level` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '类型的深度级别,越是下级的分类,该值越大',
    分类控制器添加
    /**
         * 新增
         */
        public function add() {
            $D=M('Brand');
            if(IS_POST) {
                $data = $D->create();
                if($data) {
                    if(empty($data['name'])) {
                        $this->error('名称不能为空');
                    }
                    $id = $D->add();
                    if($id) {
                        $D->cacheClear(true);
                        $this->success('新增成功', U('index'));
                    } else {
                        $this->error('新增失败');
                    }
                } else {
                    $this->error($D->getError());
                }
            } else {
                $pid    = I('get.parent_id', 0, 'intval');
    //生成分类树
                $this->assign('_Tree',From::selectCategory(getBrand(),$pid,'size="" class="col-xs-12 col-sm-2" name="brand_id"','请选择栏目',0,['idName'=>'brand_id']));
                $this->meta_title = '新增';
                $this->display('edit');
            }
        }
      

  3.   


    function add(){
    换成你的内容模型
    表单就换成内容参数值得表单
                $cate=new NavigationModel('cate'); 
                 
                if($vo=$cate->create()){
                 
                if($cate->add()){
                        $this->success('添加成功');
                    }else{
                        $this->error('添加栏目失败');
                    }
     
                     
                 
                }else{
                    $this->error($cate->getError());
                }
             
        }