我有一個系統,允許訪客通過列表,排序和過濾瀏覽產品。配置路由器cakephp使無限制/可選參數
我希望我的URL看起來像這樣"/category/smartphones/samsung/android/.../"
時選擇「品牌」,「operting系統類型」,「CPU」,...遊客過濾器,這樣他們每次過濾的東西,URL將改變,如:
filter by brand : /category/smartphones/samsung/
by os type : /category/smartphones/android/
by brand and os type : /category/smartphones/samsung/android/
...
此外,訪問者可以在篩選時進行排序,或者在排序時篩選。所以url可以更像"/category/smartphones/samsung/android/sort:created/direction:desc/"
我不知道cakephp可以做這樣或不是因爲我是初學者在這個框架。或任何類似的解決方案?
我剛剛在路由器中進行了排序配置。但我不知道如何從類似的東西開始(過濾器是無限參數)。