Example #1
0
 /**
  * Set Custom configuration
  * @param template current template
  * @return overwritten configuration
  **/
 function setCustomConfig($template)
 {
     $xmlfile = JPATH_BASE . DS . 'templates' . DS . $template . DS . 'config' . DS . $this->design . DS . $this->custom_xml . '.xml';
     if (!JFile::exists($xmlfile)) {
         JYAML::setError('XML File', 'Not Found: ' . DS . 'config' . DS . $this->design . DS . $this->custom_xml . '.xml');
     }
     $xmldoc =& JFactory::getXMLParser('Simple');
     $xmldoc->loadfile($xmlfile);
     $xmlconfig = $xmldoc->document->config[0];
     if ($xmlconfig) {
         foreach ($xmlconfig->children() as $child) {
             $this->readXML($template, $child, false);
         }
     }
 }