Add extension hook points.

This commit is contained in:
Will Rossiter 2013-01-18 10:49:53 +13:00
parent 1c5e737d06
commit d42fba7906
1 changed files with 8 additions and 3 deletions

View File

@ -34,8 +34,11 @@ class GoogleSitemapController extends Controller {
$this->getResponse()->addHeader('Content-Type', 'application/xml; charset="utf-8"');
$sitemaps = GoogleSitemap::get_sitemaps();
$this->extend('updateGoogleSitemaps', $sitemaps);
return array(
'Sitemaps' => GoogleSitemap::get_sitemaps()
'Sitemaps' => $sitemaps
);
} else {
return new SS_HTTPResponse('Page not found', 404);
@ -57,9 +60,11 @@ class GoogleSitemapController extends Controller {
$this->getResponse()->addHeader('Content-Type', 'application/xml; charset="utf-8"');
// But we want to still render.
$items = GoogleSitemap::get_items($class, $page);
$this->extend('updateGoogleSitemapItems', $items, $class, $page);
return array(
'Items' => GoogleSitemap::get_items($class, $page)
'Items' => $items
);
} else {
return new SS_HTTPResponse('Page not found', 404);