Exemplo n.º 1
0
 /** Print a Google Sitemaps representation of tree */
 function printTree(&$joomap, &$root)
 {
     header('Content-type: text/xml;');
     echo '<?xml version="1.0" encoding="UTF-8"?>' . "\n";
     echo '<urlset xmlns="http://www.google.com/schemas/sitemap/0.84">' . "\n";
     $tmp = array();
     foreach ($root as $menu) {
         // concatenate all menu-trees
         foreach ($menu->tree as $node) {
             $tmp[] = $node;
         }
     }
     echo JoomapGoogle::getList($tmp);
     echo "</urlset>\n";
     die;
 }