Welcome Guest, Not a member yet? Register   Sign In
I have a problem with new module

I cannot use $this->load->module_model in view in new my module. Please help me

Load the model in the controller and call it in the view.



I have problem in load model with PyroCMS. I use $this->load->module_model in view in new my module but it can not work. Can you help me

[eluser]Phil Sturgeon[/eluser]
Could you give more detail on what is "not working"? Is it white screen, error message or did your monitor explode?

This is code in view layer in new my module:
$listcate = $this->mproductcategories->GetAllCategories('vn');

I get a error: "A PHP Error was encountered
Severity: Notice
Message: Undefined property: CI_Loader::$mproductcategories
Filename: views/index.php"

"Fatal error: Call to a member function GetAllCategories() on a non-object"

Can you explain to me how to call a function in model from view layer in a module. Thanks you very much

I also another problem: I can not call a function in model to view in sam module with PyroCMS. Can you help me??

Theme © iAndrew 2016 - Forum software by © MyBB