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