栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > PHP > php开源框架 > dedecms

修改织梦dede专题内容页节点排序方法

dedecms 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

修改织梦dede专题内容页节点排序方法

在织梦dede网站专题内容页中节点排序默认都是按照更新的时间顺序排列的,排序的方式是降序,在调用专题内容页的内容的时候调用的标签也是{dede:field.note /},想要修改调用的排序方法也是可以的。

织梦dede专题内容页节点排序的修改方法:

1、{dede:field.note}其实是用{dede:arclist}{/dede:arclist}标签里的lib_arclistDone来解析的,所以orderby和order都是可以控制排序方法的,orderby是文档排序方式,order是降序还是升序。

2、打开dede/spec_add.php和dede/spec_edit.php

分别找到:
$notelist .= "{dede:specnote imgheight=\'$imgheight\' imgwidth=\'$imgwidth\'
infolen=\'$infolen\' titlelen=\'$titlelen\' col=\'$col\' idlist=\'$okids\'
name=\'$notename\' noteid=\'$noteid\' isauto='$isauto' rownum=\'$rownum\'
keywords=\'$keywords\' typeid=\'$typeid\'}
2个文件里边的这段内容都是相同的,在
typeid=\'$typeid\'
后边加入
order=\'asc\'(order前边有个空格)

3、打开include/taglib/channel/specialtopic.lib.php,找到

$ctag->GetAtt('att')
在其后边加入
$ctag->GetAtt('order')

4、找到specialtopic.lib.php第51行中的default改为id即可。

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/5291.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号