Displaying all versions of a particular document
In this recipe, we will see how to display all previous versions of the document.
How to do it...
1. In the Company Home > Data Dictionary > Presentation Templates space, create a new content. Let's name it doc_versions.ftl.
2. Put the following template code:
<#if document?exists> <h3>Version History of <u>${document.name}</u></h3> <table cellspacing=10> <tr align=left><th>Version</th><th>Name</th><th>Description</th><th>Created Date</th><th>Creator</th></tr> <#list document.versionHistory as v> <tr> <td><a href="/alfresco${v.url}" target="new">${v.versionLabel}</a></td> <td><a href="/alfresco${v.url}" target="new">${v.name}</a></td> <td><#if v.description?exists>${v.description}</#if></td> <td>${v.createdDate?datetime}</td> <td>...