Search found 3 matches
- Wed Feb 20, 2008 2:52 pm
- Forum: Joombie Coding Q/A
- Topic: how to get stuff from controller to view...
- Replies: 3
- Views: 446
Re: how to get stuff from controller to view...
AHA! Figured out a better way to do it :) Controller: function display() { $model =& $this->getModel(); $document =& JFactory::getDocument(); $viewType = $document->getType(); $view =& $this->getView(null, $viewType); $model->setSector("User-input"); $view->setModel($model); $v...
- Wed Feb 20, 2008 9:02 am
- Forum: Joombie Coding Q/A
- Topic: how to get stuff from controller to view...
- Replies: 3
- Views: 446
Re: how to get stuff from controller to view...
OK, I've solved it by doing it this way instead. In the controller: $sector = "User-input-here"; $document =& JFactory::getDocument(); $viewType = $document->getType(); $view =& $this->getView(null, $viewType); $view->setSector($sector); And then in the view: $model =& $this->g...
- Wed Feb 20, 2008 7:25 am
- Forum: Joombie Coding Q/A
- Topic: how to get stuff from controller to view...
- Replies: 3
- Views: 446
how to get stuff from controller to view...
Hi! I've made a component and in the controller done: $model =& $this->getModel(); $sector = "User-input-here"; $model->setSector($sector); But when I do this in my view: $model =& $this->getModel(); echo $model->getSector(); I get nothing! Am I missing something here? Is this the ...