silverstripe-googlesitemaps/_config.php
2012-05-11 10:53:46 +02:00

15 lines
404 B
PHP

<?php
// adds a rule to make www.site.com/sitemap.xml work
Director::addRules(10, array(
'sitemap.xml' => 'GoogleSitemap',
));
// add the extension to pages
if (class_exists('SiteTree')) Object::add_extension('SiteTree', 'GoogleSitemapSiteTreeDecorator');
// if you need to add this to DataObjects include the following in
// your own _config:
// GoogleSiteMap::register_dataobject('MyDataObject');