Calling a View that resides under a different Module

edited November 2012 in Modules
I have view that is inside Fuel->Modules->Flexicart from which I would like display view_cart in my fuel cms main.php. I tried it but it generates all sorts of errors related to included files and complaining form_open() is undefined. I tried the following code from my controller.
$this->data['content']='flexicart/view_cart'; $this->load->view('_layouts/main', $this->data);
My question is this. Is it possible to display a view that resides in a different module in my main.php?

Comments

  • edited 1:58PM
    Try one of the following:
    $this->load->module_view('flexicart', '_layouts/main', $this->data); $this->load->view('flexicart/_layouts/main', $this->data);
    Additionally, there is a corresponding module_model, module_library, module_helper and module_config that can be used of the "load" object .
  • edited November 2012
    Thanks for the reply. I tried both but results in failure including header files associated with the flexicart module and other errors. Found that I have to load all the libraries, helpers etc. beforehand from the controller itself before calling the view.
Sign In or Register to comment.