Example #1
0
 /**
  * Display the view
  */
 public function display($tpl = null)
 {
     // get the data
     $this->form = $this->get('Form');
     $this->item = $this->get('Item');
     $this->state = $this->get('State');
     $this->params = JComponentHelper::getParams('com_jkit');
     // lists
     $this->lists = new stdClass();
     $this->lists->langs = JKitHelperLangs::getLangs();
     $this->lists->translations = array();
     // get tag translations
     if (isset($this->item->id)) {
         $translations = JKitHelperLangs::getTranslations(array($this->item), 'tags');
         if (count($translations)) {
             foreach ($translations as $translation) {
                 $this->lists->translations[$translation->lang] = new stdClass();
                 $this->lists->translations[$translation->lang]->title = $translation->title;
                 $this->lists->translations[$translation->lang]->alias = $translation->alias;
             }
         }
     }
     // create the toolbar
     JKitHelper::getToolbar(false, $this->item->id, $this->item->title);
     // display the view template
     parent::display($tpl);
 }
Example #2
0
 /**
  * Display the view
  */
 public function display($tpl = null)
 {
     // get the data from the model
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     $this->state = $this->get('State');
     // filters
     $this->filterForm = $this->get('FilterForm');
     $this->activeFilters = $this->get('ActiveFilters');
     // lists
     $this->lists = new stdClass();
     $this->lists->langs = JKitHelperLangs::getLangs();
     $this->lists->translations = JKitHelperLangs::getTranslations($this->items, 'tags');
     // toolbar and sidbar
     JKitHelper::getToolbar(false, $this->state->get('filter.state') == -2);
     $this->sidebar = JHtmlSidebar::render();
     // display the view template
     parent::display($tpl);
 }