Skip to content

Commit

Permalink
Merge pull request PlasticStudio#1 from PlasticStudio/updates
Browse files Browse the repository at this point in the history
Updates from in the field
  • Loading branch information
Jeremy Cole committed Sep 7, 2016
2 parents 26c7df4 + 0df4648 commit 1553c95
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
3 changes: 2 additions & 1 deletion code/HTMLSitemap.php
Expand Up @@ -13,7 +13,8 @@ class HTMLSitemap extends Page {
);

private static $defaults = array(
'ShowInMenus' => 0
'ShowInMenus' => 0,
'Sort' => 10000
);

public function getCMSFields(){
Expand Down
9 changes: 5 additions & 4 deletions code/XMLSitemap.php
Expand Up @@ -13,7 +13,8 @@ class XMLSitemap extends Page{
);

private static $defaults = array(
'ShowInMenus' => 0
'ShowInMenus' => 0,
'Sort' => 10001
);

public function getCMSFields(){
Expand Down Expand Up @@ -71,11 +72,11 @@ function UpdateXMLFile(){
$file = BASE_PATH . '/sitemap.xml';
$fp = fopen($file, "w");
// prepend xml tag to result (gets excluded from curl)
$output = '<?xml version="1.0" encoding="UTF-8"?>';
$output .= $xml;
/*$output = '<?xml version="1.0" encoding="UTF-8"?>';
$output .= $xml;*/

// write xml file
fwrite($fp, $output);
fwrite($fp, $xml);


}
Expand Down
2 changes: 1 addition & 1 deletion templates/Includes/XMLSitemapNextLevel.ss
Expand Up @@ -2,7 +2,7 @@
<% if not ExcludeFromSitemap %>
<url>
<loc>$AbsoluteLink</loc>
<lastmod>$LastEdited</lastmod>
<lastmod>{$LastEdited.Format(Y-m-d)}T{$LastEdited.Format(H:i:s)}+00:00</lastmod>
</url>
<% if Children %>
<% include XMLSitemapNextLevel %>
Expand Down
2 changes: 1 addition & 1 deletion templates/XMLSitemap.ss
Expand Up @@ -8,7 +8,7 @@
<% if not ExcludeFromSitemap %>
<url>
<loc>$AbsoluteLink</loc>
<lastmod>$LastEdited</lastmod>
<lastmod>{$LastEdited.Format(Y-m-d)}T{$LastEdited.Format(H:i:s)}+00:00</lastmod>
</url>
<% if Children %>
<% include XMLSitemapNextLevel %>
Expand Down

0 comments on commit 1553c95

Please sign in to comment.