function display($tpl = null) { $canDo = CoalawebcontactHelper::getActions(); $model = $this->getModel(); if (version_compare(JVERSION, '3.0', '>')) { CoalawebcontactHelper::addSubmenu('controlpanel'); } // Is this the Professional release? jimport('joomla.filesystem.file'); $isPro = COM_CWCONTACT_PRO == 1; $this->assign('isPro', $isPro); $version = COM_CWCONTACT_VERSION; $this->assign('version', $version); $releaseDate = COM_CWCONTACT_DATE; $this->assign('release_date', $releaseDate); $needsDlid = $model->needsDownloadID(); $this->assign('needsdlid', $needsDlid); if (COM_CWCONTACT_PRO == 1) { JToolBarHelper::title(JText::_('COM_CWCONTACT_TITLE_PRO') . ' [ ' . JText::_('COM_CWCONTACT_TITLE_CPANEL') . ' ]', 'cw-cpanel'); } else { JToolBarHelper::title(JText::_('COM_CWCONTACT_TITLE_CORE') . ' [ ' . JText::_('COM_CWCONTACT_TITLE_CPANEL') . ' ]', 'cw-cpanel'); } if ($canDo->get('core.admin')) { JToolBarHelper::preferences('com_coalawebcontact'); } $help_url = 'http://coalaweb.com/support-menu/documentation/item/coalaweb-contact-guide'; JToolBarHelper::help('COM_CWCONTACT_TITLE_HELP', false, $help_url); parent::display($tpl); }
/** * Method to display a view. * * @param boolean * @param array * * @return JController * @since 1.5 */ public function display($cachable = false, $urlparams = false) { require_once JPATH_COMPONENT . '/helpers/coalawebcontact.php'; // Load the submenu. if (version_compare(JVERSION, '3.0', '<')) { CoalawebcontactHelper::addSubmenu(JRequest::getCmd('view', 'Controlpanel')); } $view = JRequest::getCmd('view', 'Controlpanel'); $layout = JRequest::getCmd('layout', 'default'); parent::display(); return $this; }