#set($content = $_XPathTool.selectSingleNode($contentRoot, "/system-index-block/calling-page/system-page/system-data-structure/content")) #set ( $currentpage = $_XPathTool.selectSingleNode($contentRoot, "/system-index-block/system-page[@current]")) #set ( $pages = $_XPathTool.selectNodes($contentRoot, "/system-index-block/system-page[name !='index']")) #set ($counter = 0) $_SortTool.addSortCriterion("start-date", "", "number", "ascending", "") $_SortTool.sort($pages) #set ( $articlesize = $pages.size() ) #if ($articlesize > 0) #foreach ($page in $pages) #set ($counter = $foreach.index) #set ($date = $_DateTool.getDate($page.getChild("start-date").value) ) #set ($previous = $counter - 1) #set ($next = $counter + 1) #set ($pageLink = $page.getChild("link").value) #if ($page.getAttribute("current")) #if ($previous > 0) #set ($prevPage = $pages.get($previous).getChild("link")) #else #set ($prevPage = false) #end #if ($next < $articlesize) #set ($nextPage = $pages.get($next).getChild("link")) #else #set ($nextPage = false) #end #end This is article $counter and the date is $_DateTool.format("MM/dd/yyyy", $date) and the path is $pageLink. The previous article is $previous. The next article is $next. ----------------------------------------------------------------- #end #end #if ($prevPage) The previous page path is $prevPage.value. #else The previous page is the index or none #end #if ($nextPage) The next page path is $nextPage.value. #else The next page is the index or none #end
${_SerializerTool.serialize($content, true)}
#if ($prevPage)

Previous Month is $previous

The previous page path is $prevPage.value. #end #if ($nextPage)

Next Month is $next

The next page path is $nextPage.value. #end