Created
February 22, 2013 14:12
-
-
Save christianseel/5013671 to your computer and use it in GitHub Desktop.
GoogleSitemap Snippet: use latest publication date as date field for articles container
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ($child instanceof ArticlesContainer) { | |
$date = $this->modx->runSnippet('getResources',array( | |
'showHidden' => '1', | |
'parents' => $id, | |
'depth' => '1', | |
'limit' => '1', | |
'published' => '1', | |
'sortby' => '{"publishedon":"DESC"}', | |
'tpl' => 'getResources.publishedon' | |
)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
add to
/core/compoments/googlesitemap/model/googlesitemap/googlesitemap.class.php
around line 106