#-- Shows some general info about the current document, including NodeRef and aspects applied -->
<#if document?exists>
Current Document Info:
Name: ${document.name}
Ref: ${document.nodeRef}
Type: ${document.type}
DBID: ${document.properties["sys:node-dbid"]}
Content URL: /alfresco${document.url}
Locked: <#if document.isLocked>Yes<#else>No#if>
<#if hasAspect(document, "cm:countable") == 1 && document.properties['cm:counter']?exists>
Counter: ${document.properties['cm:counter']}
#if>
Aspects:
<#list document.aspects as aspect>
${aspect} |
#list>
Properties:
<#-- Get a list of all the property names for the document -->
<#assign props = document.properties?keys>
<#list props as t>
<#-- If the property exists -->
<#if document.properties[t]?exists>
<#-- If it is a date, format it accordingly -->
<#if document.properties[t]?is_date>
${t} = ${document.properties[t]?datetime} |
<#-- If it is a boolean, format it accordingly -->
<#elseif document.properties[t]?is_boolean>
${t} = ${document.properties[t]?string("yes", "no")} |
<#-- If it is a collection, enumerate it -->
<#elseif document.properties[t]?is_enumerable>
${t} = <#list document.properties[t] as i>${i} #list> |
<#-- Otherwise treat it as a string -->
<#else>
${t} = ${document.properties[t]} |
#if>
#if>
#list>
<#else>
No document found!
#if>