dedecms 按照ID升序 降序排列方法
按ID排序降序排列:
{dede:arclist channelid='' row='10' titlelen='60' orderby='id' } <li><a href='[field:arcurl /]' title="[field:fulltitle /]">[field:title /]</a></li> {/dede:arclist} |
row='10' 调用10条, titlelen='60'标题长度为30汉字 orderby='id' 按ID,降序排列
按ID排序顺序排列
{dede:arclist channelid='' row='10' titlelen='60' orderby='id' orderway='asc' } <li><a href='[field:arcurl /]' title="[field:fulltitle /]">[field:title /]</a></li> {/dede:arclist} |
row='10' 调用10条, titlelen='60'标题长度为30汉字 orderby='id' 按ID升序排列,
orderway='desc' 值为 desc 或 asc ,指定排序方式是降序还是顺向排序,默认为降序