Consortium
Activities
Projects
Forge
Events
Log-in
Register
MacrosOW
Space Menu
Consortium
|
Solutions
|
Middleware
|
Forge
|
MyObjectWeb
|
PDF
|
History
|
More Actions
View
Code
|
XML
|
Help
Documentation
|
XWiki Syntax
|
#macro(blog $category $nbitems $nbstart) #if($category=='') #set ($sql = ", BaseObject as obj where obj.name=doc.fullName and obj.className='XWiki.ArticleClass' and obj.name<>'XWiki.ArticleClassTemplate' order by doc.creationDate desc") #else #set ($sql = ", BaseObject as obj, DBStringListProperty as prop join prop.list list where obj.name=doc.fullName and obj.className='XWiki.ArticleClass' and obj.name<>'XWiki.ArticleClassTemplate' and obj.id=prop.id.id and prop.id.name='category' and list='${category}' order by doc.creationDate desc") #end #set($cdate = "") #set($inbitems = $xwiki.parseInt($nbitems)) #set($inbstart = $xwiki.parseInt($nbstart)) #set($counter = 0) #foreach ($item in $xwiki.searchDocuments($sql, $inbitems, $inbstart)) #set($counter = $counter+1) #set($bentrydoc = $xwiki.getDocument($item)) #set($bentryobj = $bentrydoc.getObject("XWiki.ArticleClass")) <p class="news"><img src="$xwiki.getDocument("Blog.Category").getAttachmentURL("hexagone.gif","download")" alt="Topic" height="16" width="17"> $xwiki.formatDate($bentrydoc.creationDate, "MMM dd, yyyy"): $bentrydoc.display("title","view", $bentryobj) </p> <p> #set($content = $bentrydoc.display("content", "view", $bentryobj)) $bentrydoc.getRenderedContent($content) <p> #if($counter==$inbitems) <div style="float: right; margin-right: 30px"> #if ($inbstart!=0) #set($iprev = $inbstart - $inbitems) [Previous>$doc.name?nbstart=${iprev}] #end #set($inext = $inbstart + $inbitems) [Next>$doc.name?nbstart=${inext}] </div> #end #end #end #blog($category $nbitems $nbstart)