Thumbnails Template

From AlfrescoWiki

Jump to: navigation, search


Contents

[edit] Description

Displays GIF, PNG and JPG images in the current folder as a 3 column list of clickable thumbnails images. Use the template as a custom view when you have a folder containing images that you would like to see thumbnails for.

[edit] Screenshot

Image:ThumbnailsCustomTemplate1.png

[edit] Template

<#-- 3 column list of small thumbnails for images in the current folder -->
<#assign colcount=0>
<table width=100%>
<#list space.children as child>
  <#if child.isDocument && (child.mimetype = "image/gif" || child.mimetype = "image/jpeg" || child.mimetype = "image/png")>
    <#if colcount % 3 = 0><tr></#if>
    <td align=center>
      <div style='padding:8px'><a href="/alfresco${child.url}" target="new"><img src="/alfresco${child.url}" width=120 border=0></a></div>
      <div><a href="/alfresco${child.url}" target="new">${child.properties.name}</a></div>
    </td>
    <#if colcount % 3 = 2></tr></#if>
    <#assign colcount=colcount+1>
  </#if>
</#list>
</table>

[edit] Requirements

Alfresco Version 1.4

[edit] Source

Example Alfresco template not installed by default in the 'Data Dictionary/Presentation Templates' folder.