Hi,
I created a component with a view called e.g. "MyView" and associated default model "MyViewModel.php". In "MyView/HtmlView.php" I want to load the default model and also an extra additional model called "MyView2Model.php".
Doing works and creates an object. Loading the second model gives NULL. Any idea what is wrong? I assume all the paths and naming conventions are correct. If I rename the second model to "MyView" and change the name of the class accordingly than the model loads flawlessly.
Doe it mean that I can use only one model per view?
Thanks!
I created a component with a view called e.g. "MyView" and associated default model "MyViewModel.php". In "MyView/HtmlView.php" I want to load the default model and also an extra additional model called "MyView2Model.php".
Doing
Code:
$model1 = $this->getModel('MyView');
Code:
$model2 = $this->getModel('MyView2');
Doe it mean that I can use only one model per view?
Thanks!
Statistics: Posted by JanoD — Mon Nov 04, 2024 7:26 pm