Skip to content
Browse files

MINOR: moved director route to new config API

  • Loading branch information...
1 parent a72dd1a commit c5c92abad23be2f09f3c52647bb8c8e3e28d47b5 @wilr wilr committed
Showing with 8 additions and 6 deletions.
  1. +2 −6 _config.php
  2. +6 −0 _config/routes.yml
View
8 _config.php
@@ -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:
View
6 _config/routes.yml
@@ -0,0 +1,6 @@
+---
+Name: googlesitemaproutes
+---
+Director:
+ rules:
+ 'sitemap.xml': 'GoogleSitemap'

0 comments on commit c5c92ab

Please sign in to comment.
Something went wrong with that request. Please try again.