AnsweredAssumed Answered

How to address an aspect from a template

Question asked by rdifrango on Jan 7, 2009
Latest reply on Jan 8, 2009 by rdifrango
I have created a custom aspect called department that has 1 attribute of departmentName, how do I get access to this value from a Freemarker template:

<#if c.hasAspect("demo:department")?exists>
<departmentName>${c.properties["demo:department"][0]}</departmentName>
<#else>
<departmentName/>
</#if>

Did not work and neither did:

<departmentName>${c.properties.department.departmentName}</departmentName>

Any help would be appreciated.

I saw this post but the answer was not posted:

http://forums.alfresco.com/en/viewtopic.php?f=12&t=6889&start=0&st=0&sk=t&sd=a&hilit=hasaspect

Outcomes