2008-11-19 04:31:31 +01:00
|
|
|
<?php
|
2009-08-12 05:51:43 +02:00
|
|
|
|
|
|
|
// adds a rule to make www.site.com/sitemap.xml work
|
2008-12-05 03:47:07 +01:00
|
|
|
Director::addRules(10, array(
|
|
|
|
'sitemap.xml' => 'GoogleSitemap',
|
|
|
|
));
|
2009-08-12 05:51:43 +02:00
|
|
|
|
2011-06-07 20:37:38 +02:00
|
|
|
// add the extension to pages
|
2012-05-11 10:53:46 +02:00
|
|
|
if (class_exists('SiteTree')) Object::add_extension('SiteTree', 'GoogleSitemapSiteTreeDecorator');
|
2011-06-07 20:37:38 +02:00
|
|
|
|
|
|
|
// if you need to add this to DataObjects include the following in
|
|
|
|
// your own _config:
|
|
|
|
|
|
|
|
// GoogleSiteMap::register_dataobject('MyDataObject');
|