Exemple #1
0
 /**
  * display method
  * @return void
  **/
 function display($tpl = null)
 {
     // make mainframe variable available
     global $mainframe, $option;
     // get design and template name
     $template_name = JRequest::getVar('template_name', 'hm_yaml', 'REQUEST');
     $this->assignRef('template_name', $template_name);
     $design = JRequest::getVar('design', 'default', 'REQUEST');
     $this->assignRef('design', $design);
     // Global XML for referenz view
     $xmlfile = JPATH_SITE . DS . 'templates' . DS . $template_name . DS . 'config' . DS . '_global.xml';
     $config_global = JYAML::readConfig($template_name, $xmlfile);
     $this->assignRef('config_global', $config_global);
     // Design XML
     $xmlfile = JPATH_SITE . DS . 'templates' . DS . $template_name . DS . 'config' . DS . $design . '.xml';
     $config_design = JYAML::readConfig($template_name, $xmlfile);
     $this->assignRef('config_design', $config_design);
     // Custom Config XML
     $filename = JRequest::getVar('file', NULL, 'REQUEST');
     $this->assignRef('filename', $filename);
     $xmlfile = JPATH_SITE . DS . 'templates' . DS . $template_name . DS . 'config' . DS . $design . DS . $filename;
     $config = JYAML::readConfig($template_name, $xmlfile);
     $this->assignRef('config', $config);
     $html_list = JYAML::getHTMLList();
     $this->assignRef('html_list', $html_list);
     $designlist = JYAML::getDesignList();
     $this->assignRef('designlist', $designlist);
     $positions = JYAML::getPositions();
     $this->assignRef('positions', $positions);
     /*** Load Configuration ***/
     $conf_design = JYAML::parseConfigDesign($this->config_design, true);
     $conf_global = JYAML::parseConfigDesign($this->config_global);
     $conf = JYAML::parseConfigDesign($this->config);
     $this->assignRef('conf', $conf);
     $this->assignRef('conf_design', $conf_design);
     $this->assignRef('conf_global', $conf_global);
     /*** Buttons ***/
     // Explore Buttons for Stylesheets
     $explore_buttons[0][0]['label'] = 'YAML EXPLORE CSS';
     $explore_buttons[0][0]['link'] = 'index3.php?option=' . $option . '&controller=templateExplorer&task=view&ext=css&template_name=' . $this->template_name . '&design=' . $design;
     // Explore Buttons for Scripts
     $explore_buttons[1][0]['label'] = 'YAML EXPLORE SCRIPTS';
     $explore_buttons[1][0]['link'] = 'index3.php?option=' . $option . '&controller=templateExplorer&task=view&ext=js&template_name=' . $this->template_name . '&design=' . $design;
     $this->assignRef('explore_buttons', $explore_buttons);
     parent::display($tpl);
 }
Exemple #2
0
 /**
  * display method
  * @return void
  **/
 function display($tpl = null)
 {
     // make mainframe variable available
     global $mainframe, $option;
     // get template name
     $template_name = JRequest::getVar('template_name', 'hm_yaml', 'REQUEST');
     $this->assignRef('template_name', $template_name);
     $design = JRequest::getVar('design', 'default', 'REQUEST');
     $this->assignRef('design', $design);
     $xmlfile = JPATH_SITE . DS . 'templates' . DS . $template_name . DS . 'config' . DS . '_global.xml';
     $config = JYAML::readConfig($template_name, $xmlfile);
     $this->assignRef('config', $config);
     $designlist = JYAML::getDesignList(true);
     $this->assignRef('designlist', $designlist);
     $positions = JYAML::getPositions();
     $this->assignRef('positions', $positions);
     /*** Load Configuration ***/
     $conf = JYAML::parseConfigDesign($this->config);
     $this->assignRef('conf', $conf);
     parent::display($tpl);
 }