addTemplatePath( dirname(__FILE__) . DS . 'tmpl' ); // client information (site, administrator, ... ) jimport( 'joomla.application.helper' ); $client = JApplicationHelper::getClientInfo($mainframe->getClientID()); // make sure we only show the component JRequest::setVar( 'tmpl', 'component' ); $document =& JFactory::getDocument(); $document->setTitle( 'J!Dump - ' . ucfirst( $client->name ) ); $document->addScriptDeclaration( "var imageFolder = '" . DUMP_URL . "assets/images/'" ); // Path to images $document->addStyleSheet( DUMP_URL . 'assets/css/folder-tree-static.css' ); $document->addStyleSheet( DUMP_URL . 'assets/css/dump.css' ); $document->addScript( DUMP_URL . 'assets/js/folder-tree-static.js'); $document->addScript( DUMP_URL . 'assets/js/dump.js'); // render tree and assign to template $tree =& $this->renderTree(); $this->assignRef('tree', $tree ); $this->assignRef( 'application', $client->name ); $this->assign( 'version', DUMP_VERSION ); $this->assign( 'closebutton', JRequest::getVar( 'closebutton', 1 ) ); parent::display($tpl); } function & renderTree() { global $mainframe; $output = ''; // get the nodes from the model $nodes =& $this->get('nodes'); // render the nodes to