Esempio n. 1
0
 /**
  * Load the template
  * set available positions of the template to the document
  * set the Javascript and Cascade Style Sheets if there's not an XML HTTP Request
  */
 public function setTemplate()
 {
     $eApplication = Factory::getApplication();
     $Template = Factory::getTemplate();
     $ContentType = $eApplication->get('ContentType');
     $XHRequest = $eApplication->get('XHRequest');
     if ($ContentType == 'text/html' && !$XHRequest) {
         foreach ($Template->getPositions() as $p) {
             $this->setPosition($p);
         }
         foreach ($Template->getJavaScripts() as $v) {
             $this->setJavaScript($v);
         }
         foreach ($Template->getStyleSheets() as $v) {
             $this->setStyleSheet($v);
         }
     } else {
         $this->setPosition('XHRequest');
     }
 }