03-23-2011 01:20 PM
03-27-2011 05:34 PM
<#if (noscopefound?? && noscopefound)>
{
"tags" : []
}
<#else>
{
"tags" : [
<#import "tagging.lib.ftl" as taggingLib/>
<#list tags?sort_by("name") as item>
<@taggingLib.tagJSON item=item />
<#if item_has_next>,</#if>
</#list>
]
}
</#if>
03-30-2011 02:32 PM
08-06-2012 12:08 PM
08-06-2012 04:37 PM
Where exactly is this 'extension directory'? I assume it is under <alfresco-dir>/tomcat/shared/classes but I have made several attempts to put the ftl script in a logical directory there and then 'refresh scripts' but it did not work. I was able to put the ftl script in the alfresco directory under <alfresco-dir>/tomcat/webapps/alfresco (I know - I should not - I would rather not) and was able to make that work, but I would prefer to learn where these scripts should be located under the 'extensions' directory. I am using version 4.0.c.
08-06-2012 09:49 PM
09-15-2014 10:17 AM
diff tag-filter.js tag-filter.js.original
38,47d37
< /**
< * We need a sorting function for our array of tag Objects
< **/
< function sortByKey(array, key) {
< return array.sort(function(a, b) {
< var x = a[key]; var y = b[key];
< return ((x < y) ? -1 : ((x > y) ? 1 : 0));
< });
< };
<
218,219d207
< // We need to sort the tags array by name….
< tags = sortByKey(tags, 'name');
05-19-2015 12:37 PM
09-01-2015 10:33 AM
08-07-2017 01:57 PM
still works for 201707 Community Edition:
create directory
/opt/alfresco/tomcat/shared/classes/alfresco/extension/templates/webscripts/org/alfresco/repository/tagging
In this directory create the file tagscope-tags.get.json.ftl with the following contents:
<#if (noscopefound?? && noscopefound)>
{
"tags" : []
}
<#else>
{
"tags" : [
<#import "tagging.lib.ftl" as taggingLib/>
<#list tags?sort_by("name") as item>
<@taggingLib.tagJSON item=item />
<#if item_has_next>,</#if>
</#list>
]
}
</#if>
stop and start Alfresco and tags are sorted alfabetically
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.