天天看點

destoon和Java比較_destoon任何頁面實作自定義篩選的方法

首頁在頁頭引入jquery.min.js 檔案,預設的模闆是有這個的。如果不是預設的模闆,也沒這個檔案,請去下載下傳個。然後在篩選的頁面引入以下JS代碼:然後在模闆中引入條件語句,這下面的是篩選條件,看不懂的先學學,參考修改。{php $condition = "status=3";}{php $dmode = array('',1=>" and price=0",2=>" and price>0");}{php $dcatid = array('',1=>" and catid=10",2=>" and catid=11");}{php $dprice = array('',1=>" and price<1001",2=>" and price>1000 and price<2000",3=>" and price>2001 and price<3000",4=>" and price>3001 and price<5000",5=>" and and price>5001 and price<10001",6=>" and price>10000");}{php $order = isset($order) ? intval($order) : 0;}{php $mode = isset($mode) ? intval($mode) : 0;}{php $dorder = array('addtime desc','price desc','hits desc');}{php $condition.= $dmode[$mode];}{php $condition.= $dcatid[$catid];}{php $condition.= $dprice[$price];}{php $condition.=" order by $dorder[$order]";}篩選模闆,僅供參考

收費模式

全部 商業模闆 免費模闆

模闆類型

全部 平台型 小衆型

價格

全部 1000以下 1000-2000 2000-3000 3000-5000 5000-10000 10000以上