aspcms获取随机文章的修改方法
查找:ASPCMS_MainClass.asp文件中的两处要加
case "isfeatured" : orderStr =" and IsFeatured order by ContentOrder,a.AddTime desc"
case "isfeatured" : orderStr =" and IsFeatured=1 order by ContentOrder,a.AddTime desc"
分别在后面加入一行代码:
case "isRnd" : Randomize : orderStr =" order by rnd(-(ContentID +"&rnd()&"))"
标签调用:{aspcms:content num=10 order=isRnd}
可获得10条的随机文章,福州印秀网络亲测静态页面可以生效。