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.
var carpeta = args.carpeta; var resultados = new Array(); var espacio = roothome.childByNamePath(carpeta); for each(n in espacio.children) { if ( n.isDocument == true ) { // salida+="Ruta de los archivos: "+n.displayPath+"/"+n.name+"\n\r"; resultados[resultados.length]=n; } } // aquí me gustaría ordenarlos model.resultados=resultados;
var carpeta = args.carpeta; var resultados = new Array(); var espacio = roothome.childByNamePath(carpeta); for each(n in espacio.children) { if ( n.isDocument == true ) { // salida+="Ruta de los archivos: "+n.displayPath+"/"+n.name+"\n\r"; resultados[resultados.length]=n; } } // aquí me gustaría ordenarlos resultados.sort(Sorting); model.resultados=resultados; //funcion de ordenacion function Sorting(a, b) { var x = a.properties["cm:created"]; var y = b.properties["cm:created"]; return ((x > y) ? 1 : -1); }
<#list space.childrenByXPath[".//*[subtypeOf('cm:content')]"]?sort_by(["properties", "cm:created"]) as child>
Muchas Gracias!!! Era lo que buscaba.Gracias por tu colaboración.Feliz Año Nuevo!!!