public function display($tpl = null) { // Get system variables $application = JFactory::getApplication(); $document = JFactory::getDocument(); // Get the item from our model $this->fetchItem(); // Set the meta-data $document->setTitle($this->item->title); $document->setMetaData('title', $this->item->title); // Initialize the parameters if ($this->item->params) { $p = clone $this->params; $this->item->params = YireoHelper::toParameter($this->item->params); $p->merge($this->item->params); $this->item->params = $p; } else { $this->item->params = $this->params; } if ($this->item->params->get('meta_author') != '') { $document->setMetaData('author', $this->item->params->get('meta_author')); } if ($this->item->params->get('meta_description') != '') { $document->setDescription($this->item->params->get('meta_description')); } if ($this->item->params->get('meta_keywords') != '') { $document->setMetadata('keywords', $this->item->params->get('meta_keywords')); } // Parse important parameters $layout = null; $this->item = $this->_prepareItem($this->item, $layout); // Check whether the item is still here if (empty($this->item)) { JError::raiseError(404, JText::_('Resource Not Found')); } // when the link was "hidden", we call the link-plugin to decide what to do if (JRequest::getCmd('task') == 'hidden') { $this->item->params->set('show_link', 0); $this->item->extra = SimplelistsPluginHelper::getPluginLinkHidden($item); } else { $this->item->extra = null; } parent::display($tpl); }