diff --git a/config/alfresco/templates/content/examples/RSS_2.0_recent_docs.ftl b/config/alfresco/templates/content/examples/RSS_2.0_recent_docs.ftl deleted file mode 100644 index 62957c681d..0000000000 --- a/config/alfresco/templates/content/examples/RSS_2.0_recent_docs.ftl +++ /dev/null @@ -1,42 +0,0 @@ - - - - Alfresco - Copyright (c) 2005 Alfresco Software, Inc. All rights reserved. - <#assign hostname="http://localhost:8080/alfresco"> - <#assign spaceref="${hostname}/navigate/browse/${space.nodeRef.storeRef.protocol}/${space.nodeRef.storeRef.identifier}/${space.nodeRef.id}"> - <#assign datetimeformat="EEE, dd MMM yyyy HH:mm:ss zzz"> - ${spaceref} - Recent Changes to '${space.name}' - en-us - ${date?string(datetimeformat)} - ${date?string(datetimeformat)} - 120 - Alfresco 1.2 - - ${space.name} - 32 - 32 - ${spaceref} - ${hostname}${space.icon32} - - <#assign weekms=1000*60*60*24*7> - <#list space.childrenByXPath[".//*[subtypeOf('cm:content')]"] as child> - <#if (dateCompare(child.properties["cm:modified"], date, weekms) == 1) || (dateCompare(child.properties["cm:created"], date, weekms) == 1)> - - ${child.properties.name} - ${hostname}${child.url} - - ${""?xml}${child.properties.name}${""?xml} - <#if child.properties["cm:description"]?exists && child.properties["cm:description"] != ""> - ${child.properties["cm:description"]} - - - ${child.properties["cm:modified"]?string(datetimeformat)} - ${hostname}${child.url} - - - - - - diff --git a/config/alfresco/templates/content/examples/company_logos.ftl b/config/alfresco/templates/content/examples/company_logos.ftl deleted file mode 100644 index 51befa00b1..0000000000 --- a/config/alfresco/templates/content/examples/company_logos.ftl +++ /dev/null @@ -1,20 +0,0 @@ -<#-- Table of the images found in a folder under Company Home called "Company Logos" --> -<#-- Shows each image found as inline content --> - - <#list companyhome.children as child> - <#if child.isContainer && child.name = "Company Logos"> - <#list child.children as image> - <#switch image.mimetype> - <#case "image/jpeg"> - <#case "image/gif"> - <#case "image/png"> - - - - <#break> - <#default> - - - - -
diff --git a/config/alfresco/templates/content/examples/doc_info.ftl b/config/alfresco/templates/content/examples/doc_info.ftl index 00af7cc5b0..2821edeeee 100644 --- a/config/alfresco/templates/content/examples/doc_info.ftl +++ b/config/alfresco/templates/content/examples/doc_info.ftl @@ -1,18 +1,47 @@ <#-- Shows some general info about the current document, including NodeRef and aspects applied --> -

General document info

<#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 hasAspect(document, "cm:countable") == 1 && document.properties['cm:counter']?exists> + Counter: ${document.properties['cm:counter']}
+ Aspects: <#list document.aspects as aspect>
${aspect}
+ 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> + + + <#-- If it is a boolean, format it accordingly --> + <#elseif document.properties[t]?is_boolean> + + + <#-- If it is a collection, enumerate it --> + <#elseif document.properties[t]?is_enumerable> + + + <#-- Otherwise treat it as a string --> + <#else> + + + + +
${t} = ${document.properties[t]?datetime}
${t} = ${document.properties[t]?string("yes", "no")}
${t} = <#list document.properties[t] as i>${i}
${t} = ${document.properties[t]}
<#else> No document found! diff --git a/config/alfresco/templates/content/examples/example.ftl b/config/alfresco/templates/content/examples/example.ftl deleted file mode 100644 index 28628aa543..0000000000 --- a/config/alfresco/templates/content/examples/example.ftl +++ /dev/null @@ -1,47 +0,0 @@ -

=====Example Template Start=====

- -Company Home Space: ${companyhome.properties.name} -
-My Home Space: ${userhome.properties.name} -
-Company Home children count: ${companyhome.children?size} -
-Company Home first child node name: ${companyhome.children[0].properties.name} -
-Current Document Name: ${document.name} -
-Current Space Name: ${space.name} - -

List of child spaces in my Home Space:

- -<#list userhome.children as child> - <#if child.isContainer> - - - - - - - -
${child.properties.name} (${child.children?size})Path: ${child.displayPath}
- -

List of docs in my Home Space (text only content shown inline, JPG images shown as thumbnails):

- -<#list userhome.children as child> - <#if child.isDocument> - - <#if child.mimetype = "text/plain"> - - <#elseif child.mimetype = "image/jpeg"> - - - - -
${child.properties.name}
${child.content}
- -

Assoc example:

-<#if userhome.children[0].assocs["cm:contains"]?exists> - ${userhome.children[0].assocs["cm:contains"][0].name} - - -

=====Example Template End=====

diff --git a/config/alfresco/templates/content/examples/my_pressreleases.ftl b/config/alfresco/templates/content/examples/my_pressreleases.ftl deleted file mode 100644 index 1fa8d9c825..0000000000 --- a/config/alfresco/templates/content/examples/my_pressreleases.ftl +++ /dev/null @@ -1,22 +0,0 @@ -<#-- Displays a table of all the documents from a "Press Releases" folder under Company Home --> -<#-- Obviously this folder needs to exist and the docs in it should have the title and description fields set --> - - <#list companyhome.children as child> - <#if child.isContainer && child.name = "Press Releases"> - <#list child.children as doc> - <#if doc.isDocument> - - - - - - - - - - - - - - -

${doc.properties.title}

${doc.properties.description}
${doc.content}
diff --git a/config/alfresco/templates/content/examples/userhome_docs.ftl b/config/alfresco/templates/content/examples/userhome_docs.ftl deleted file mode 100644 index 180fb92aa7..0000000000 --- a/config/alfresco/templates/content/examples/userhome_docs.ftl +++ /dev/null @@ -1,15 +0,0 @@ -<#-- List of docs in the Home Space for current user --> -<#-- If the doc mimetype is plain/text then the content is shown inline --> -<#-- If the doc mimetype is JPEG then the image is shown inline as a small thumbnail image --> - -<#list userhome.children as child> - <#if child.isDocument> - - <#if child.mimetype = "text/plain"> - - <#elseif child.mimetype = "image/jpeg"> - - - - -
${child.properties.name}
${child.content}
diff --git a/config/alfresco/templates/content/examples/xpath_search.ftl b/config/alfresco/templates/content/examples/xpath_search.ftl deleted file mode 100644 index b81f9440d5..0000000000 --- a/config/alfresco/templates/content/examples/xpath_search.ftl +++ /dev/null @@ -1,26 +0,0 @@ -<#-- Shows use of the childByNamePath, childrenByXPath and childrenByLuceneSearch API --> - -

Template Documents in 'Company Home/Data Dictionary/Presentation Templates':

- -<#list companyhome.childByNamePath["Data Dictionary/Presentation Templates"].children as child> - <#if child.isDocument> - - - -
${child.properties.name}
- -

Folders in 'Company Home/Data Dictionary/Space Templates/Software Engineering Project':

- -<#list companyhome.childrenByXPath["*[@cm:name='Data Dictionary']/*[@cm:name='Space Templates']/*[@cm:name='Software Engineering Project']/*"] as child> - <#if child.isContainer> - - - -
${child.properties.name}
- -

Lucene Search - documents containing the text 'Alfresco'

- -<#list companyhome.childrenByLuceneSearch["TEXT:alfresco"] as child> - - -
${child.properties.name}
diff --git a/config/alfresco/templates/content_template_examples.xml b/config/alfresco/templates/content_template_examples.xml index f993d5a5fe..e0ae7574bc 100644 --- a/config/alfresco/templates/content_template_examples.xml +++ b/config/alfresco/templates/content_template_examples.xml @@ -7,8 +7,8 @@ true - Displays basic information about the current document - contentUrl=classpath:alfresco/templates/content/examples/doc_info.ftl|mimetype=text/plain|size=636|encoding=UTF-8 + Displays useful information about the current document + contentUrl=classpath:alfresco/templates/content/examples/doc_info.ftl|mimetype=text/plain|size=1884|encoding=UTF-8 doc_info.ftl doc_info.ftl @@ -84,20 +84,6 @@ - - - - - - - true - Renders a valid RSS2.0 XML document showing the documents in the current space created or modified in the last 7 days. The template should be configured to use the appropriate server and port before use. - contentUrl=classpath:alfresco/templates/content/examples/RSS_2.0_recent_docs.ftl|mimetype=text/plain|size=1917|encoding=UTF-8 - RSS_2.0_recent_docs.ftl - RSS_2.0_recent_docs.ftl - - - @@ -140,18 +126,4 @@ - - - - - - - true - Example of using XPath and Lucene searches within a template. - contentUrl=classpath:alfresco/templates/content/examples/xpath_search.ftl|mimetype=text/plain|size=1109|encoding=UTF-8 - xpath_search.ftl - xpath_search.ftl - - - \ No newline at end of file