Displaying all documents in current space
We have seen a simple template that displays current space's name and description. Now let's create a template that will list all the documents of the current space, along with the snapshot of the images.
How to do it...
1. In the Company Home > Data Dictionary > Presentation Templates space, create a new content. Let's name it space_details.ftl.
2. Put the following template code:
<#if space??> <h2> Documents in ${space.name} </h2> <table> <#assign cnt=0> <#list space.children as c> <#if c.isDocument> <#assign cnt=cnt+1> <tr><td>${cnt}. <a href="${url.context}${c.downloadUrl}">${c.properties.name}</a></td></tr> <#if c.mimetype = "image/jpeg" || c.mimetype = "image/png" || c.mimetype = "image/gif"> <tr><td style='padding-left:20px'><img width=100 height=65 src="${url.context}${c.url}"><td></tr> </#if> </#if>...