#set ( $year = $_XPathTool.selectSingleNode($contentRoot, "/system-index-block//system-folder[@current and not(@reference)]") ) #set ( $months = $_XPathTool.selectNodes($year, "system-folder" ) ) #set ( $page = $_XPathTool.selectSingleNode($contentRoot, "/system-index-block/calling-page/system-page") ) #set ( $data = $_XPathTool.selectSingleNode($page, "system-data-structure") ) #set ( $yearSerialized = $_SerializerTool.serialize($year.getChild("name"), true) )

${yearSerialized}

#listMonths($months)
#macro(listMonths $months) #if ($months.size() > 0) $_SortTool.addSortCriterion("name", "", "number", "ascending", "") $_SortTool.sort($months) #foreach ( $m in $months ) #set ( $articles = $_XPathTool.selectNodes($m, "system-page[path != '/_internal/base-assets/article' and title != '']") ) #displayMonthHeading($m.getChild("path").value) #listMonthArticles($articles) #end #end #end #macro(listMonthArticles $articles) #if ($articles.size() > 0) $_SortTool.addSortCriterion("start-date", "", "number", "ascending", "") $_SortTool.sort($articles) #end #end #macro(displayMonthHeading $monthFolderPath) #set ( $month = $_DateTool.toDate("yyyy/MM", $monthFolderPath.substring(1)) )

${_DateTool.format("MMMM yyyy", $month)}

#end