Example #1
0
 /**
  * Generate an XML sitemap for webcrawlers
  */
 function index()
 {
     if (Request::getRequestedConferencePath() == 'index') {
         $doc = SitemapHandler::createSitemapIndex();
         header("Content-Type: application/xml");
         header("Cache-Control: private");
         header("Content-Disposition: inline; filename=\"sitemap_index.xml\"");
         XMLCustomWriter::printXML($doc);
     } else {
         if (Request::getRequestedSchedConfPath() == 'index') {
             // At conference level
             $doc = SitemapHandler::createConfSitemap();
             header("Content-Type: application/xml");
             header("Cache-Control: private");
             header("Content-Disposition: inline; filename=\"sitemap.xml\"");
             XMLCustomWriter::printXML($doc);
         } else {
             // At scheduled conference level
             $doc = SitemapHandler::createSchedConfSitemap();
             header("Content-Type: application/xml");
             header("Cache-Control: private");
             header("Content-Disposition: inline; filename=\"sitemap.xml\"");
             XMLCustomWriter::printXML($doc);
         }
     }
 }