I’m trying to find a way to configure the UrlManager to remove all parameters from a Url.
The case is that of a pagination on a listview where I have defined a rule to put the page numbers as part of the main url:-
'collections/<name:.*?>/<type:\d+>/page/<page:\d>' => '/search/results', 'collections/<name:.*?>/<type:\d+>' => '/search/results',
As you can see it is being diverted to a controller called search, which is using the route to hardcode the search parameter from the type variable in the url.
However, the pagination object, in ‘createUrl’, is adding back some of the GET parameters such as searchForm[type].
Is there a way to configure the urlManager to truncate all parameters? or do I need to extend it and do this myself?