#set ($year = $_XPathTool.selectSingleNode($contentRoot, "/system-index-block//system-folder[@current and not(@reference)]"))
#set($page = $_XPathTool.selectSingleNode($contentRoot, "/system-index-block/calling-page/system-page"))
#set($data = $_XPathTool.selectSingleNode($page, "system-data-structure"))
#set ($articles = $_XPathTool.selectNodes($year, "system-folder[position() <= last()-1]/system-page[path != '/_internal/base-assets/article']"))
#set ($yearSerialized = $_SerializerTool.serialize($year.getChild("name"), true))

$_SortTool.addSortCriterion("start-date", "", "number", "ascending", "")
$_SortTool.sort($articles)

## THIS IS FOR TESTING PURPOSES
## #foreach ($article in $articles)
## #set ($startDate = $_DateTool.getDate($article.getChild("start-date").value))
## $startDate<br />
## #end

<div class="recent-stories nopadding">
     <section class="wide-page">
<h2>$yearSerialized</h2>
#set ($previous = "nothing")
#foreach ($article in $articles)
    #set ($startDate = $_DateTool.getDate($article.getChild("start-date").value))
    #set ($currentMonth = $_DateTool.format("MMMM", $startDate))

    #if ($previous != $currentMonth )
<h3>$currentMonth $yearSerialized</h3>
        #set ($previous = $currentMonth)
        
    #end    

        
        #if($article.getChild("title"))
        <ul>
        <li>$_DateTool.format("MM/dd/yyyy", $startDate)<a href="${article.getChild('path').value}">$_SerializerTool.serialize($article.getChild("title"), true)</a>
        </li>
##        #if($article.getChild("summary"))$_SerializerTool.serialize($article.getChild("summary"), true)#end
    </ul>

#end

#end
</section>
</div>