如何实现以“推荐级”为主的排序方式?
问题:能不能实现这样一种排序,即(推荐+更新时间)降序的文章排序?即,以推荐级(数字越大越靠前)为主,如果推荐级相同则以更新时间降序。该怎么做才可以?
解决:
标签名: |
{PE.Label id="文章信息列表_普通式" /} |
ordertype |
0 |
1-8 |
|
排序方式,1----按文章ID降序,2----按文章ID升序,3----按更新时间降序,4----按更新时间升序,5----按点击数降序,6----按点击数升序,7--按评论数降序,8--按评论数升序 |
目前的标签里没有按推荐优先级来排序的,这个需要改进。
用户可以自己增加一种排序方式ordertype 9-按推荐优先级降序 10-按推荐优先级升序
后台系统设置 标签管理 内容信息列表_排序方式
加入
{PE.Label id="内容信息列表_查询条件" parentid="
" arrnodeid="
" includechild ="
" specialid="
" urltype="
" shownum="
" ishot="
" iselite="
" inputername="
" datenum="
" ordertype="
" showtype="
" titlelen="
" contentlen="
" shownodename="
" showpropertytype="
" showincludepic="
" showauthor="
" showdatetype="
" showhits="
" showhotsign="
" shownewsign="
" showtips="
" showcommentlink="
" usepage="
" opentype="
" cols="
" hits="
" elitelevel="
" tablename="
" sqlordertype=" C.EliteLevel DESC" sqlinnerordertype=" IC.EliteLevel DESC" /}
{PE.Label id="内容信息列表_查询条件" parentid="
" arrnodeid="
" includechild ="
" specialid="
" urltype="
" shownum="
" ishot="
" iselite="
" inputername="
" datenum="
" ordertype="
" showtype="
" titlelen="
" contentlen="
" shownodename="
" showpropertytype="
" showincludepic="
" showauthor="
" showdatetype="
" showhits="
" showhotsign="
" shownewsign="
" showtips="
" showcommentlink="
" usepage="
" opentype="
" cols="
" hits="
" elitelevel="
" tablename="
" sqlordertype=" C.EliteLevel ASC" sqlinnerordertype=" IC.EliteLevel ASC" /}
也可以下载附件 覆盖到标签库中
也可以自己写个新的标签,查询语句:select * from PE_CommonModel where Status=99 order by EleteLevel,UpdateTime Desc
在标签调用的时候
{PE.Label id="文章信息列表_普通式" parentid="@Request_id" arrnodeid="0" includechild="true" specialid="0" urltype="0" shownum="7" ishot="false" iselite="false" inputername="" datenum="0" ordertype="9" showtype="1" titlelen="30" contentlen="0" shownodename="false" showpropertytype="1" showincludepic="false" showauthor="false" showdatetype="mm-dd" showhits="false" showhotsign="false" shownewsign="false" showtips="true" showcommentlink="false" usepage="false" opentype="_blank" cols="0" hits="0" elitelevel="0" /}
点击浏览该文件
论坛地址: