Hi there, Anybody know how to render partial view with model from controller action or render child action like
{{ render_action(array("controller"=>"index","action"=>"listProduct")) }}
class IndexController{
public function indexAction(){
$this->view->products = data_from_db;
}
// this action should render as child action
public function listProductAction(){
$this->view->products = data_from_db;
}
}
class CatalogController{
public function indexAction(){
// $this->view->products = data_from_db;
// no data pass to view that contains the code load partial view
}
}
Partail view included in view catalog/index does not work if there is no model from controller. I dont want each time including partial view, I have to set model for view from controller.
Could anybody please help me solve this problem?