首页-讨论-默认分类下,点击“发表话题”,会出现如下错误:

发现是在\Application\Home\View\default\Article\lists_topic.html的15行:<a href="{:U('edit?model=1&category='.$category['name'])}" class="btn btn-primary btn-block btn-large">发表话题</a>有错误,将model=1改为2,即可。
第二个问题:
首页,所有文章都不显示,只显示如下图所示:

查了下,貌似是onethink里面的Article.class.php的问题,在如下位置添加:

'list' => array('attr' => 'name,category,child,page,row,field', 'close' => 1), //获取指定分类列表然后在最后添加函数: public function _list($attr, $content){
$tag = $this->parseXmlAttr($attr, 'next');
$name = $tag['name'];
$cate = $tag['category'];
$child = empty($tag['child']) ? 'false' : $tag['child'];
$page = empty($tag['page']) ? '0' : $tag['page'];
$row = empty($tag['row']) ? '10' : $tag['row'];
$filed = empty($tag['filed']) ? 'true' : $tag['filed'];
$parse = '<?php ';
$parse .= '$category=D(\'Category\')->getChildrenId('.$cate.');';
$parse .= '$__LIST__ = D(\'Document\')->page('.$page.','.$row.')->lists(';
$parse .= '$category, \'`create_time` DESC\', 1,';
$parse .= $filed . ');';
$parse .= ' ?>';
$parse .= '<volist name="__LIST__" id="'. $name .'">';
$parse .= $content;
$parse .= '</volist>';
return $parse;
} 最佳答案