Queries That Sort using template
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2006 12:24 PM
Hi,
I have created a template that execute a lucene search and I want sort for property name the results of this search.
Is there a way?
For example
Regards,
Emanuela
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
Labels:
- Labels:
-
Archive
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-05-2006 11:25 AM
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.
<#list companyhome.childrenByLuceneSearch[searchString]?sort_by(['properties','cm:name']) as child>
replace cm with whatever your property's namespace prefix is, if different.
Aaron.
