mirror of
https://github.com/wilr/silverstripe-googlesitemaps.git
synced 2024-10-22 11:05:48 +02:00
Merge pull request #5 from UndefinedOffset/ss-3.0
API CHANGE: compatibility with SilverStripe 3.0. For SilverStripe 2.4 releases please use the 0.2 branch.
This commit is contained in:
commit
295aba26e6
@ -6,14 +6,14 @@
|
||||
*
|
||||
* @package googlesitemaps
|
||||
*/
|
||||
class GoogleSitemapDecorator extends DataObjectDecorator {
|
||||
class GoogleSitemapDecorator extends DataExtension {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @package googlesitemaps
|
||||
*/
|
||||
class GoogleSitemapSiteTreeDecorator extends SiteTreeDecorator {
|
||||
class GoogleSitemapSiteTreeDecorator extends DataExtension {
|
||||
|
||||
function extraStatics() {
|
||||
return array(
|
||||
@ -23,7 +23,7 @@ class GoogleSitemapSiteTreeDecorator extends SiteTreeDecorator {
|
||||
);
|
||||
}
|
||||
|
||||
function updateCMSFields(&$fields) {
|
||||
function updateSettingsFields(&$fields) {
|
||||
$prorities = array(
|
||||
'' => _t('SiteTree.PRIORITYAUTOSET', 'Auto-set based on page depth'),
|
||||
'-1' => _t('SiteTree.PRIORITYNOTINDEXED', "Not indexed"), // We set this to -ve one because a blank value implies auto-generation of Priority
|
||||
@ -39,7 +39,7 @@ class GoogleSitemapSiteTreeDecorator extends SiteTreeDecorator {
|
||||
'0.1' => '10 - ' . _t('SiteTree.PRIORITYLEASTIMPORTANT', "Least important")
|
||||
);
|
||||
|
||||
$tabset = $fields->findOrMakeTab('Root.Content');
|
||||
$tabset = $fields->findOrMakeTab('Root.Settings');
|
||||
|
||||
$message = "<p>";
|
||||
$message .= sprintf(_t('SiteTree.METANOTEPRIORITY', "Manually specify a Google Sitemaps priority for this page (%s)"),
|
||||
|
@ -1,11 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||
<% control Items %>
|
||||
<% loop $Items %>
|
||||
<url>
|
||||
<loc>$AbsoluteLink</loc>
|
||||
<lastmod>$LastEdited.Format(c)</lastmod>
|
||||
<% if ChangeFreq %><changefreq>$ChangeFreq</changefreq><% end_if %>
|
||||
<% if Priority %><priority>$Priority</priority><% end_if %>
|
||||
<% if $ChangeFreq %><changefreq>$ChangeFreq</changefreq><% end_if %>
|
||||
<% if $Priority %><priority>$Priority</priority><% end_if %>
|
||||
</url>
|
||||
<% end_control %>
|
||||
<% end_loop %>
|
||||
</urlset>
|
Loading…
Reference in New Issue
Block a user