Skip to content

Instantly share code, notes, and snippets.

@dvdsmpsn
Created June 6, 2014 20:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dvdsmpsn/e25c0a7d161514b8c851 to your computer and use it in GitHub Desktop.
Save dvdsmpsn/e25c0a7d161514b8c851 to your computer and use it in GitHub Desktop.
List of objects available to velocity in Confluence
## @see: http://stackoverflow.com/a/23819584/1958200
#set($macroUtilClass=$action.class.forName('com.atlassian.confluence.renderer.radeox.macros.MacroUtils'))
#set($getContextMethod=$macroUtilClass.getDeclaredMethod('defaultVelocityContext',null))
#set($ctx=$getContextMethod.invoke(null))
<h2>List of objects available to velocity</h2>
<ul>
#foreach($p in $ctx.keySet().toArray())
<li>$p.toString() - $ctx.get($p).getClass().getName().toString()</li>
#end
</ul>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment