cancel
Showing results for 
Search instead for 
Did you mean: 

How to address an aspect from a template

jenskock
Champ in-the-making
Champ in-the-making
Hi everybody,

I have created a custom Aspect called 'Factuur' that has several properties (for instance Factuurdate and Factuurnumber). I wrote a template that displays all the documents that have that certain aspect, but i also want to display that aspect. When I try to write the aspect, I can't seem to get the syntax right.

<#list space.childrenByXPath[".//*[subtypeOf('cm:content')]"] as child>
<#if child.isDocument>
<tr>

<#if hasAspect(child,"custom:Factuur") = 1>
<td bgcolor=${Kleur}>${child.aspects.Factuur.Factuurnr}</td>
<#else>
<td bgcolor=${Kleur}>X</td>
</#if>         

The check if the document has an aspect works, but how do I 'read' the aspect? The child.aspects.Factuur….etc doesn't work…

Thanks in advance!

Jens
1 REPLY 1

jenskock
Champ in-the-making
Champ in-the-making
Never mind, I got it!