function display($tpl = null) { // Request category $this->cat = JRequest::getVar('cat', $this->params->get('cat', 'all')); $id = JRequest::getInt('id', 0); if (JRequest::getVar('task') == 'compare') { $this->getCompare(); } else { if ($id) { if ($this->getLayout() == 'default') { $app =& JFactory::getApplication(); global $templatePath; $templatePath = JPATH_BASE . DS . 'templates' . DS . $app->getTemplate() . DS . 'html' . DS . 'com_jea' . DS . 'properties' . DS . 'tmpl' . DS; $this->_createFileName('', 'form'); $this->addTemplatePath($templatePath); // $tpl = 'item'; $tpl = 'form'; // $tpl = $this->_createFileName('', 'hoan'); // print_r($tpl); // exit(); } $this->getItemDetail($id); } else { $this->getItemsList(); } } JHTML::script('jea.js', 'media/com_jea/js/', false); //bat dau them if ($tpl == 'form') { //get params values $this->googlemap_display = $this->params->get('googlemap_display'); $this->googlemap_disable = $this->params->get('googlemap_disable'); $this->show_googlemap = $this->params->get('show_googlemap'); $this->bdslqmo = $this->params->get('bdslqmo'); $keyvnprice = ''; // get show ajax $GetShowBDSLQ = JeaViewProperties::GetShowBDSLQ($keyvnprice); $this->assignRef('ShowProperties', $GetShowBDSLQ); // get show ajax $getShowAjax = JeaViewProperties::getShowAjax(); $this->assignRef('ShowAjax', $getShowAjax); // hien thi cho trinh dien anh $ShowImageList = JeaViewProperties::getShowImageList(); $this->assignRef('ShowImageList', $ShowImageList); // hien thi cho trinh dien anh $ShowImage = JeaViewProperties::getShowImage(); $this->assignRef('ShowImage', $ShowImage); // hien thi layout chi tiet bds o fontend $this->Status = 0; // getlegal_statusList $legalstatusList = JeaViewProperties::getlegal_statusList($id); $this->assignRef('legalstatusList', $legalstatusList); // getAdvantageslist $Advantageslist = JeaViewProperties::getAdvantageslist(); $this->assignRef('Advantageslist', $Advantageslist); // // bat dong san lien quan //$SamPro = JeaViewProperties::GetBDSLienQuan(); //$this->assignRef('SamPro' , $SamPro ); } parent::display($tpl); }