getTag(); return substr($tag, 0, strpos($tag, '-')); } public function getTopics($file) { $result = ''; if (file_exists($file)) { // load xml $xml = simplexml_load_file($file); if ($xml) { foreach ($xml->help->children() as $topic) { $subtopics = $topic->subtopic; $class = count($subtopics) ? 'subtopics' : ''; $key = (string) $topic->attributes()->key; $title = (string) $topic->attributes()->title; $file = (string) $topic->attributes()->file; // if file attribute load file if ($file) { $result .= $this->getTopics(JPATH_SITE . '/components/com_jce/editor/' . $file); } else { $result .= '