mirror of
https://github.com/wilr/silverstripe-googlesitemaps.git
synced 2024-10-22 11:05:48 +02:00
MINOR: moved director route to new config API
This commit is contained in:
parent
a72dd1a094
commit
c5c92abad2
@ -1,12 +1,8 @@
|
|||||||
<?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
|
// 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
|
// if you need to add this to DataObjects include the following in
|
||||||
// your own _config:
|
// your own _config:
|
||||||
|
6
_config/routes.yml
Normal file
6
_config/routes.yml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
Name: googlesitemaproutes
|
||||||
|
---
|
||||||
|
Director:
|
||||||
|
rules:
|
||||||
|
'sitemap.xml': 'GoogleSitemap'
|
Loading…
Reference in New Issue
Block a user