AnsweredAssumed Answered

Accessing custom Properties in Freemarker Templates

Question asked by aswini on Feb 12, 2009
Latest reply on Feb 12, 2009 by aswini
Hi,

Could someone provide help on how to access custom aspects in FTL?

For eg: Javascript:
<table cellpadding=2 border=1 style="BORDER: none;" frame="border" width=700 height=50>
    <tr>
        <th><b>status</b></th>
    </tr>
        <#list space.childrenByLuceneSearch[".//*[subtypeOf('cm:content')"] as child>
           <tr>                      
                            <td>
                               <#list workflow.assignedTasks as t>
                                ${t.properties["My:status"]}
                                </#list>
                            </td>
           </tr>
        </#list>
</table>

And my customModel has:

<aspects>
        <aspect name="My:status">
            <title>Status</title>
            <properties>
                <property name="My:status">
                    <title>Status</title>
                    <type>d:text</type>
                    <default>Draft</default>
                </property>
            </properties>
        </aspect>
    </aspects>

But when I apply the Presentation Template FTL - it says {t.properties["My:status"]} is undefined!!!!

Help required for correcting this…

Thanks

Aswini

Outcomes