E
E
EvgMul2019-02-14 18:40:21
Yii
EvgMul, 2019-02-14 18:40:21

How to properly set up the CNC for filters?

Hello. We are working on the implementation of the CNC on the site and everything would be fine, but we ran into the problem that when filtering by some criteria, we get a url that looks something like this:

?RoutesSearch%5Bid_district%5D=5&RoutesSearch%5Bid_region%5D=41&RoutesSearch%5Btype_id%5D=9&RoutesSearch%5Bperiod%5D=4

If everything is clear with ordinary urls: to set up routing rules, where you need to register redirects, then in filters I find it difficult to implement.
Can you please let me know if you faced this problem and what solutions did you use? Thanks in advance to all who respond.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
padlyuck, 2019-02-15
@padlyuck

There is only one solution. Get rid of the js that comes with yii and write your own form handler, which will collect the url of the form /actionName/id_district/5/id_region/41/type_id/9/period/4 and the urlManager'a rule that will have similar links according to the form process. But it will be very hemorrhoid if you need to partially preserve the functionality of a standard script (for example, Ajax validation).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question