Hello all, I'm running my Xwiki as an information management Intranet alongside a networked drive that holds hundreds of documents. Based off the TODO tutorial, I made a system of inputting these documents as objects on individual pages that then appear on a filterable-sortable table. The link being a windowsPath macro. The idea behind this is that users can access these documents much easier.
The problem with this system is if a new document is created, the user then has to manually add it to this table, and if the document's title is changed, the link gets broken. So I'm after a way of automatically listing the documents and have working links, to make it require as little upkeep as possible. So far I am able to list the name and the path of all the documents in the directory, but I need some help in integrating the sortable table html tags and turning the path into a working link, without breaking the groovy macro. This is what I have so far: ---- {{groovy}} import groovy.io.FileType def list = [] def dir = new File("R:/Quality/FORMS/") dir.eachFileRecurse (FileType.FILES) { file -> list << file } list.each { println it.name println it.path } {{/groovy}} ---- Any help would be appreciated, Thanks, ----- ---- Lockie -- View this message in context: http://xwiki.475771.n2.nabble.com/Automatically-list-and-link-files-in-a-directory-with-Groovy-tp5715784p5715784.html Sent from the XWiki- Users mailing list archive at Nabble.com. _______________________________________________ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users