function display($tpl = null) { $this->sidebar = JHtmlSidebar::render(); $params = JComponentHelper::getParams('com_joomdle'); if ($params->get('mailing_list_integration') == 'no') { JToolbarHelper::title(JText::_('COM_JOOMDLE_VIEW_MAILINGLIST_TITLE'), 'mailinglist'); $this->message = JText::_('COM_JOOMDLE_MAILING_LIST_INTEGRATION_NOT_ENABLED'); $tpl = "disabled"; parent::display($tpl); return; } $this->courses = JoomdleHelperMailinglist::getListCourses(); $this->addToolbar(); parent::display($tpl); }