• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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??

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.