How to pass value from controller to view - Joomla! Forum - community, help and support


i tried:

code: select all

//controller
$show_all = 'lolo';
$view->assign('show', $show_all);
//view
public function display($tpl = null){
      $result = $this->show;
      var_dump($result);
      die();
      parent::display($tpl);
   }
//result
notice: undefined property:


code: select all

//controller
$show_all = 'lolo';
$view->assignref('show', $show_all);
//view
public function display($tpl = null){
      $result = $this->get('show');
      var_dump($result);
      die();
      parent::display($tpl);
   }
//result
null

i'm not sure if can done, controller not deal data, view data model not controller, put data on model class, , accessable view.





Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support