AnsweredAssumed Answered

Returning custom content model attributes as part of search

Question asked by shikarishambu on Feb 9, 2010
Latest reply on Feb 9, 2010 by unknown-user
I have a custom search script that seems to do the search and return the results corectly. However, the results list does not show any values for the attributes associated with my custom content model.

Here is the html.ftl. My content model is called step. pnum, cnum, keywords and category (not to be confused with Alfresco categories) are string attributes on the custom content model. How do I reference/ return custom content model attributes? I have tried {$row.properties.pnum} and {$row.properties["step:pnum"]?string

<#assign datetimeformat="EEE, dd MMM yyyy HH:mm:ss zzz">
<html>
<body>
<h3>Step Documents</h3>
<table>
<tr>
<td>Name</td>
<td>Size</td>
<td>Description</td>
<td>Category</td>
<td>PID</td>
<td>SID</td>
<td>TID</td>
<td>Created</td>
<td>Modified</td>
</tr>
<#list stepdocs as row>
<tr>
<td>${row.properties.name}</td>
<td>${row.size}</td>
<td><#if row.properties.description?exists>${row.properties.description!}</#if></td>
<td><#if row.properties["step:category"]?exists>${row.properties["step:category"]?string}</#if></td>
<td><#if row.properties.pnum?exists>${row.properties.pnum!}</#if></td>
<td><#if row.properties.cnum?exists>${row.properties.cnum!}</#if></td>
<td><#if row.properties.keywords?exists>${row.properties.keywords!}</#if></td>
<td>${row.properties.created?string("yyyy-MM-dd HH:mm Z")}</td>
<td>${row.properties.modified?string("yyyy-MM-dd HH:mm Z")}</td>
</tr>
</#list>
</table>
</body>
</html>

Outcomes