cancel
Showing results for 
Search instead for 
Did you mean: 

Queries That Sort using template

emmy
Champ in-the-making
Champ in-the-making
Hi,
I have created a template that execute a lucene search and I want sort for property name the results of this search.


<#if args.idCliente?exists> 
   <#assign idCliente = args.idCliente>
   <#assign searchString = "@custom\\:idCliente:" + idCliente>
</#if>
<table cellpadding="2" cellspacing="2" border="0" width="100%" style="font-size: x-small;">
<#list companyhome.childrenByLuceneSearch[searchString] as child>


Is there a way?

For example

<#list companyhome.childrenByLuceneSearch[searchString]?sort=name as child>
where name is a property of the document.

Regards,
Emanuela
1 REPLY 1

ajshaw
Champ in-the-making
Champ in-the-making
Try sometyhing like this :


<#list companyhome.childrenByLuceneSearch[searchString]?sort_by(['properties','cm:name']) as child>


replace cm with whatever your property's namespace prefix is, if different.

Aaron.
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.