Sitemap.xml for CMS 1C Bitrix by Ivan Shabanov
-
Copy files to php_interface/include/
-
Set up the sitemap.php file
- Set up all infoblocks so that they correctly form links to pages.
- Enable All infoblocks that need to be output to a file
$arBlocks[] = array(
'IBLOCK_ID' => 1,
'SECTION' => 'Y',
'DETAIL' => 'Y'
);
-
Add all menu files used on the site
$sitemap->AddPagesFromMenuFile('.top.menu.php', $http.$host);
-
Add Pages
$sitemap->AddPage($http.$host.'/stock/');
-
Add ignored pages (pages that should not be included in the file)
$sitemap->AddIgnorePage($http.$host.'/hidden/');
- in init.php add a line
include_once('sitemap.php');
- Add agent to GenerateSitemapXmlExt();