/** * Execute and display a template script. * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return mixed A string if successful, otherwise a JError object. */ function display($tpl = null) { // Get config parameters $this->_document = JFactory::getDocument(); $this->_config = JSNConfigHelper::get(); // Initialize toolbar JSNMobilizeHelper::initToolbar('JSN_MOBILIZE_PAGE_CONFIGURATION_TITLE', 'mobilize-config', false); // Get messages $msgs = ''; if (!$this->_config->get('disable_all_messages')) { $msgs = JSNUtilsMessage::getList('CONFIGURATION'); $msgs = count($msgs) ? JSNUtilsMessage::showMessages($msgs) : ''; } // Assign variables for rendering $this->assignRef('msgs', $msgs); // Load the submenu. $input = JFactory::getApplication()->input; JSNMobilizeHelper::addSubmenu($input->get('view', 'configuration')); if (!empty($_GET['g']) && $_GET['g'] == 'data') { echo JSNHtmlAsset::loadScript('jsn/data', array('language' => array('JSN_EXTFW_GENERAL_CLOSE' => JText::_('JSN_EXTFW_GENERAL_CLOSE'))), true); } // Load assets JSNMobilizeHelper::loadAssets(); // Display the template parent::display($tpl); }
/** * Execute and display a template script. * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return mixed A string if successful, otherwise a JError object. * * @see fetch() * @since 11.1 */ function display($tpl = null) { // Get config $config = JSNConfigHelper::get(); // Get messages $msgs = ''; if (!$config->get('disable_all_messages')) { $msgs = JSNUtilsMessage::getList('PROFIELS'); $msgs = count($msgs) ? JSNUtilsMessage::showMessages($msgs) : ''; } // Initialize toolbar $this->initToolbar(); // Assign variables for rendering $this->assignRef('msgs', $msgs); // Set sub-menu JSNMobilizeHelper::addSubmenu('profiles'); // Display the view parent::display($tpl); // Load assets JSNMobilizeHelper::loadAssets(); $this->addAssets(); }
/** * Execute and display a template script. * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return mixed A string if successful, otherwise a JError object. */ function display($tpl = null) { // Get config parameters $config = JSNConfigHelper::get(); // Initialize toolbar JSNMobilizeHelper::initToolbar('JSN_MOBILIZE_PAGE_ABOUT_TITLE', 'mobilize-about', false); // Get messages $msgs = ''; if (!$config->get('disable_all_messages')) { $msgs = JSNUtilsMessage::getList('ABOUT'); $msgs = count($msgs) ? JSNUtilsMessage::showMessages($msgs) : ''; } // Load the submenu. $input = JFactory::getApplication()->input; JSNMobilizeHelper::addSubmenu($input->get('view', 'about')); // Assign variables for rendering $this->assignRef('msgs', $msgs); // Display the template parent::display($tpl); // Load assets JSNMobilizeHelper::loadAssets(); }