/** * 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); } } }
/** * Generate an XML sitemap for webcrawlers * Creates a sitemap index if in site context, else creates a sitemap */ function index() { if (Request::getRequestedJournalPath() == '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 { $doc = SitemapHandler::createJournalSitemap(); header("Content-Type: application/xml"); header("Cache-Control: private"); header("Content-Disposition: inline; filename=\"sitemap.xml\""); XMLCustomWriter::printXML($doc); } }