09-09-2010 04:59 AM
default: // "path"
filterParams.variablePath = false;
filterQuery = "+PATH:\"" + parsedArgs.pathNode.qnamePath + "/*\"";
filterParams.query = filterQuery + filterQueryDefaults;
//Adding sort parameters
filterParams.sort = [
{
column: "@{http://www.alfresco.org/model/content/1.0}name",
ascending: true
},
{
column: "@{http://www.alfresco.org/model/content/1.0}modified",
ascending: false
}
];
break;
The important step here is that sorting on name only works if you add one additional sort field. If you only add cm:name for sort, it is just ignored. I think (haven't tested yet) this is applicable to other javascript searches where you need to do search on fields that are multilingual and/or tokenized. I'm not sure what is the cause that only name sort fails, the issue has been reported several times in Jira, so I do not add a new issue there, but added a comment to http://issues.alfresco.com/jira/browse/ALF-4664.
09-20-2010 10:03 AM
09-20-2010 10:44 AM
09-20-2010 11:36 AM
09-20-2010 11:51 AM
09-21-2010 04:27 AM
…
"items":
[
<#list doclist.items?sort_by("displayName") as item>
{
<@itemLib.itemJSON item=item />
}<#if item_has_next>,</#if>
</#list>
]
…
09-21-2010 04:41 AM
09-21-2010 05:31 AM
09-21-2010 06:21 AM
08-03-2011 12:02 PM
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.