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