cancel
Showing results for 
Search instead for 
Did you mean: 

Custom spaces and presentation templates

ppy62
Champ in-the-making
Champ in-the-making
Hello,

I'm using a custom model with type having "cm:folder" as parent. I don't find the way to create a presentation template that displays the properties I defined in my custom type (space).

For example:

    <type name="myco:fileSpace">
      <title>MYCO File</title>
      <parent>cm:folder</parent>
      <properties>
        <property name="myco:closureDate">
          <type>d:date</type>
        </property>
     </type>
I want to see that "myco:closureDate" property in a custom view.

Is it possible or must I create a customized root object for Freemarker?

(All samples I found are displaying document custom properties)

Thank you,
Patrick

Environment:
OS: Ubuntu / Windows
Version ALfresco Community 2.1
1 REPLY 1

ppy62
Champ in-the-making
Champ in-the-making
Hello,

If found a template that shows the properties and my custom properties are listed:

<table>
<#– Get a list of all the property names for the document –>
<#assign props = space.properties?keys>
<#list props as t>
    <#– If the property exists –>
    <#if space.properties[t]?exists>
       <tr><td>${t}</td></tr>
       </#if>
    </#if>
</#list>
</table>

I don't find the way to display the value of the custom properties. The template has a code like

<tr><td>${t} = ${space.properties[t]}</td></tr>
but this gives exceptions.

Any cue is welcome.

Thank you.

Enjoy your day,
Patrick