Display Available Icons Snippet
Warning: This snippet will work only on wikis installed on a UNIX system.
Code
{{groovy}}
xcontext.put("iconlist", new HashMap<String,List>())
"ls webapps/xwiki/resources/icons/".execute().text.eachLine() { dir ->
xcontext.get("iconlist").put(dir, "ls webapps/xwiki/resources/icons/${dir}".execute().text.split("\n") as List)
}
{{/groovy}}
{{velocity}}{{html wiki=true}}
#foreach($dir in $context.get("iconlist").keySet())
== $dir ==
#foreach($icon in $context.get("iconlist").get($dir))
#set($path = "icons/$dir/$icon")
<img src="$xwiki.getSkinFile($path)" title='$icon' />
#end
#end
{{/html}}{{/velocity}}
Result