Esempio n. 1
0
 /**
  * Display method
  *
  * @param string $tpl
  *
  * @return mixed
  */
 public function display($tpl = null)
 {
     // Check for AJAX
     if (JFactory::getApplication()->input->getInt('ajax') == 1) {
         $this->doAjaxLayout();
         parent::display($tpl);
         return true;
     }
     // Determine the layout and data
     switch (JFactory::getApplication()->input->getCmd('type')) {
         case 'product':
             $this->doProductLayout();
             break;
         case 'customer':
             $this->doCustomerLayout();
             break;
         case 'widget':
             $this->doWidgetLayout();
             break;
         case 'category':
         default:
             $this->doCategoryLayout();
             break;
     }
     parent::display($tpl);
 }
 public function display($tpl = null)
 {
     // Determine the layout and data
     switch (JRequest::getCmd('type')) {
         case 'product':
             $this->doProductLayout();
             break;
         case 'customer':
             $this->doCustomerLayout();
             break;
         case 'widget':
             $this->doWidgetLayout();
             break;
         default:
         case 'category':
             $this->doCategoryLayout();
             break;
     }
     parent::display($tpl);
 }