Z verze
změnil(a) David Brazda
k 01.03.2021 11:06
Na verzi < 45.1 >
změnil(a) David Brazda
k 01.03.2021 11:04
< >
Popis verze: Update average rating

Přehled

Rozpis

XWiki.WikiMacroClass[0]
Macro code
... ... @@ -1,10 +1,7 @@
1 1  {{velocity}}
2 2  ##fetches last 6 created pages in 30days
3 3  #set($howManyDays = 30)
4 -#set($limit = $xcontext.macro.params.get('limit'))
5 -#if (!$limit)
6 - #set($limit = 5)
7 -#end
4 +#set($limit = 5)
8 8  #set($fromDate = $datetool.systemCalendar)
9 9  #set($discard = $fromDate.add(7,-$howManyDays))
10 10  #set ($list = $services.query.xwql('where doc.creationDate > :date and doc.hidden = 0 order by doc.creationDate desc').bindValue('date', $datetool.toDate($fromDate)).setLimit($limit).execute())