jpganz18
jpganz18

Reputation: 5858

How to pass variables from Joomla controller to a model?

I have tried to find info about it. still no way to do it, any idea how to do it?

p.s. I work on Joomla 2.5 creating an MVC component.

Upvotes: 0

Views: 1466

Answers (2)

micho
micho

Reputation: 119

getModel is defines in the JController class. instead of

$this->getModel('yourmodel');

try

parent::getModel('yourmodel');

show us your code, then we can find the problem quick.

Upvotes: 0

Pramod Kumar Sharma
Pramod Kumar Sharma

Reputation: 8012

Try to use this something like this .

$model = $this->getModel('mymodel');
$item=$model->filterSection($variable);

Upvotes: 1

Related Questions