phpcms V9 在首页中调用友情链接分类
发布时间:2021-12-17 10:46 所属栏目:19 来源:互联网
导读:phpcms v9 无法在首页中调用友情链接分类,解决方法,将如下代码: phpcms/modules/link/classes/link_tag.class.php public function type_lists($data) { if (!in_array($data[listorder], array(desc, asc))) { $data [listorder] = desc; } $sql = array(mod
phpcms v9 无法在首页中调用友情链接分类,解决方法,将如下代码: phpcms/modules/link/classes/link_tag.class.php public function type_lists($data) { if (!in_array($data['listorder'], array('desc', 'asc'))) { $data ['listorder'] = 'desc'; } $sql = array('module'=>ROUTE_M,'siteid'=>$data['siteid']); $r = $this->type_db->select($sql, '*', $data['limit'], 'listorder '.$data['listorder']); return new_html_special_chars($r); } 修改为: public function type_lists($data) { if (!in_array($data['listorder'], array('desc', 'asc'))) { $data ['listorder'] = 'desc'; } $sql = array('module'=>'link','siteid'=>$data['siteid']); $r = $this->type_db->select($sql, '*', $data['limit'], 'listorder '.$data['listorder']); return new_html_special_chars($r); } 模板调用代码: {pc:link action="type_list" siteid="1" linktype="" order="listorder ASC" num="20" typeid="" } {loop $data $n $r} {$r[name]} {/loop} {/pc} (编辑:ASP站长网) |
相关内容
网友评论
推荐文章
热点阅读