I
I
Ilya Beloborodov2016-07-08 16:25:33
Yii
Ilya Beloborodov, 2016-07-08 16:25:33

Yii1 how to display filter options in address bar?

There is a product filter. How can you change the url in the address bar when working with a filter? For example, did the person filter and copy the link of the filtered products?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Timofeev, 2016-07-08
@kowap

For your task, you need to use pjax, for which there is a widget in yii2.
This is also ajax only with pushstate. It sends an ajax request, replaces the content and replaces the page address. And it all works great with all other yii2 parts and widgets.
Read this:
nix-tips.ru/yii2-vnikaem-v-pjax.html
and this:
www.yiiframework.com/doc-2.0/yii-widgets-pjax.html
well, you can do this:
https://github.com /yiisoft/jquery-pjax

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question