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()&"))"
標簽調(diào)用:{aspcms:content num=10 order=isRnd}
可獲得10條的隨機文章,福州印秀網(wǎng)絡(luò)親測靜態(tài)頁面可以生效。