在織夢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即可。
新聞熱點
疑難解答