As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
<webscript><shortname>List tags</shortname><description>Tags Alfresco</description><url>/list_tags</url><format default="csv"></format><authentication>user</authentication></webscript>
const filename = "output.csv"; function main() { var file = createFile(filename); var content = ""; var categoryResults = classification.getRootCategories("cm:taggable"); categoryResults.sort(sortByName); var i = 0; for each (var result in categoryResults) { var query = '@cm\\:taggable:"' + result.getNodeRef() + '"'; var nodes = search.luceneSearch(query); var message = ++i + ';"' + result.name + '";' + nodes.length; content += message + '\n'; logger.warn(message); } file.content += content; return 1; } /* Sort the results by case-insensitive name */ function sortByName(a, b) { return (b.properties.name.toLowerCase() > a.properties.name.toLowerCase() ? -1 : 1); } function createFile(name) { var file = companyhome.childByNamePath(name); if (file == null) file = companyhome.createFile(name); if (file == null) throw new Error("Cannot create " + name); file.content = ""; return file; } main();
<!– Add mimetype text/csv –> <bean parent="webscripts.formatmap"> <property name="formats"> <props> <prop key="csv">text/csv</prop> </props> </property> </bean>
<format default="csv" />
model.maVariable = "test"; model.monTableau = ["val1", "val2"];
${maVariable} <#list monTableau as val> ${val} <#if val_has_next>,</#if> </#list>