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條的隨機文章,福州印秀網絡親測靜態頁面可以生效。