MINOR: moved director route to new config API

This commit is contained in:
Will Rossiter 2012-06-10 21:02:29 +12:00
parent a72dd1a094
commit c5c92abad2
2 changed files with 8 additions and 6 deletions

View File

@ -1,12 +1,8 @@
<?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 (class_exists('SiteTree'))
Object::add_extension('SiteTree', 'GoogleSitemapSiteTreeDecorator');
// if you need to add this to DataObjects include the following in
// your own _config:

6
_config/routes.yml Normal file
View File

@ -0,0 +1,6 @@
---
Name: googlesitemaproutes
---
Director:
rules:
'sitemap.xml': 'GoogleSitemap'