Hi everybody!
I have 2 layouts,A shows products, B shows searching results.
As I submit searching from A,I’d like redirect to B to display searching results.
How to redirect with params from A to B ?
Anybody have any ideas?Thanks
Hi everybody!
I have 2 layouts,A shows products, B shows searching results.
As I submit searching from A,I’d like redirect to B to display searching results.
How to redirect with params from A to B ?
Anybody have any ideas?Thanks
First of all you have to do this with views and not layouts.
There is a lot of ways to do this job but I think this is the simplest way in MVC pattern
public actionA()
{
//do logic
$this->render('A',$params);
}
public actionB($search)
{
//do search logic
$this->render('B',$params);
}
also you can write above code with one action and one view.
take a look at Controllers and View
if you want just redirect from one action to another action call $this->redirect($rout) inside a controller.
Thanks.