修改织梦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即可。

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/189a862393f93fd110f036a7ab0b1cb0.html