Answer the question
In order to leave comments, you need to log in
How to change url output format?
Good afternoon.
If you use the path('_URL'_, { filter: { type: '_TYPE_' } }) function, then an address of the form _URL_?filter%5Btype%5D=_TYPE_ is generated.
The address must be of the form _URL_?filter[type]=_TYPE_
For this you can use path('_URL'_, { filter: { type: '_TYPE_' } })|replace({'%5B': '[', '%5D': ']'}) and it will work as expected.
How to do the same for forms? Because there, the address bar is formed according to the first pattern.
For example, there is a form
<form action="_URL_">
<input type="text" name="filter[type]" value="_TYPE_" />
<button>Apply</button>
</form>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question