mirror of
https://github.com/wilr/silverstripe-googlesitemaps.git
synced 2024-10-22 11:05:48 +02:00
check if SiteTree exists before adding extension
This commit is contained in:
parent
e98598ac79
commit
8a41b6fdf2
@ -6,7 +6,7 @@ Director::addRules(10, array(
|
||||
));
|
||||
|
||||
// add the extension to pages
|
||||
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:
|
||||
|
Loading…
Reference in New Issue
Block a user