phpcms v9相关文章支持order排序功能的修改方法
修改方法:
打开 phpcms/modules/content/classes/content_tag.class.php 文件
找到
$r = $this->db->select($sql2, '*', $limit,'','','id');
修改为
$r = $this->db->select($sql2, '*', $limit, $order,'','','id');
示例:
{pc:content action="relation" relation="$relation" id="$id" catid="$catid" num="5" order="inputtime DESC" keywords="$rs[keywords]"}
按发布时间排序:order="inputtime DESC"
按ID降序排序:order="id DESC"
按需求对order排序类型作调整,更新系统缓存即可
热门信息
阅读 (108)
1 phpcms v9 数据表结构(三)阅读 (107)
2 PHPSSO配置阅读 (105)
3 PHPCMS V9取消发布内容时自动获取文章标题关键词的方法阅读 (105)
4 phpcms v9开启、关闭在线编辑模板的方法阅读 (104)
5 phpcms v9 判断分类信息是否过期的方法