Is there a velocity macro or code that allows me to display all images in a directory? I am trying to dynamically list images in a JIRA directory that we use to contain add on icons and other images. Can I call the java.io.File class from velocity and display the images and their urls?
The dirctory would be like the standard jira icons directory.
images/icons
For securiy reasons you cannot access the file system directly from velocity. If you need to do this you will need to write a webwork action and provide it as a plugin.
Take a look at the documentation on how to write a webwork plugin module here: http://confluence.atlassian.com/display/JIRADEV/Webwork+plugin+module
Once you have the webwork action working you can use java.io.File as you describe to find the images you want to list.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.