What steps will reproduce the problem?
1. Author some content as new blog article
2. Go to Archive section (/archives)
3. Look for archived articles
What is the expected output? What do you see instead?
Archived blog articles should be the output.
The following is the template code not working:
#set ($startYear = 2010) #set ($endYear = $date.year) #set ($year = $date.year)
#set ($month = $date.month) #set ($yearParam = $request.getParameter("year"))
#set ($monthParam = $request.getParameter("month")) #if ($yearParam) #set
($year = $math.toInteger($yearParam)) #end #if ($monthParam) #set ($month =
$math.toInteger($monthParam)) #end #set ($yearMonth = $month+1) #set ($cal =
$date.getCalendar()) $cal.set($year, $month, 1) #if ($monthParam) #set (
$t=$cal.set($year, $month, 0) ) #end
#foreach($y in [$startYear..$endYear])
* $y
#end
#foreach($p in ${service.findPageChildrenMonth("/blog", $year, $yearMonth)})
*
$p.title
Posted on ${date.format('MMMM dd, yyyy', $p.publishDate)}
#end
As you can see I had to add a new IF statement because of calendar#set
behaviour (it starts from 0, not from 1 numbering months), so:
$cal.set($year, $month, 1) #if ($monthParam) #set ( $t=$cal.set($year, $month,
0) ) #end
Please use labels and text to provide additional information
Vosao 0.6.7
Firefox 3.6.6 and Safari 5.0
MacOS X 10.5.8
Original issue reported on code.google.com by loretopa...@gmail.com on 18 Aug 2010 at 1:57
Original issue reported on code.google.com by
loretopa...@gmail.com
on 18 Aug 2010 at 1:57