public function display($cachable = false, $urlparams = false) { $view = $this->getView('example', 'html'); $view->setLayout('default'); $view->display(); }
public function display($cachable = false, $urlparams = false) { $app = JFactory::getApplication(); $params = $app->getParams(); $view = $this->getView('example', 'json'); $view->assignRef('params',$params); $view->display(); }In this example, the display method is used to generate JSON output for a view called example. It retrieves the parameters of the application and assigns them to the view before calling the display method to generate the output. Package/Library: Joomla CMS.