Looking for Roller? The Official Roller Wiki is now hosted by the Apache Software Foundation.
To be able to show the list of the last x entries the following is needed :
a. You need to add the following macro definition to one of the velocity macro templates :
#macro( showRecentEntries $pageName $maxEntries )
#set( $recentTemplateId = $vHelper.getPageIdByName($pageName) )
#set( $map = $vHelper.getRecentWeblogEntries( $maxEntries ) )
#foreach( $day in $map.keySet() )
#set( $entries = $map.get($day) )
#parse( $recentTemplateId )
#end
#end
I added it to the website.vm , this is not possible for normal users, it has to be added by the sysadmin so freeroller users will have to ask for it. Best would be to include this in the website.vm in the Roller source.
b. As weblog user create a template page called _recent_entries using the Weblog administration console under 'Weblog:Pages' :
#foreach ($var in $entries) <a href="$baseURL/page/$userName/#formatDate($plainFormat $var.PubTime )#$var.Anchor")> - $var.title</a><br/> #end
c. In the template where you want to display the list of recent entries add :
#showRecentEntries ( "_recent_entries" 10 )
For a version that doesn't require creating a new template page, see
Lance's entry
.