function display($tpl = null)
 {
     $info = $this->get('Info');
     $this->assignRef('info', $info);
     $params = JComponentHelper::getParams('com_j2xml');
     $this->assignRef('params', $params);
     if (class_exists('JPlatform') && version_compare(JPlatform::RELEASE, '12', 'ge')) {
         J2XMLHelper::addSubmenu('cpanel');
         $this->sidebar = JHtmlSidebar::render();
     }
     $this->addToolbar();
     parent::display($tpl);
 }
 /**
  * Display the view
  */
 public function display($tpl = null)
 {
     // Initialise variables.
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     $this->state = $this->get('State');
     if (version_compare(JPlatform::RELEASE, '12', 'ge')) {
         J2XMLHelper::addSubmenu('websites');
         JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_state', JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.state'), true));
         $this->sidebar = JHtmlSidebar::render();
     }
     $this->addToolbar();
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode("\n", $errors));
         return false;
     }
     parent::display($tpl);
 }