XWiki HowTo’s

Version 1.1 by Roman Friesen on 2009/09/15 11:26

XWiki HowTo's

  1. Links
  2. Macros
    1. Create Velocity Macro

Macros

Create Velocity Macro

A write access to your XWiki installation directory is required!

  1. Add a new macro to the file "macros.vm"
    • see "<xwiki-installation-root>/xwiki/templates"
    • add at the end of the file your new macro, for example:
      #macro(myMacroName)
      Hello World!
      #end
  2. Register the new macro in the file "macros.txt"
    • see "<xwiki-installation-root>/xwiki/templates"
    • add at the end of the file the line, for example:
      myMacroName=velocity:myMacroName:
  3. After XWiki restart the new velocity macro can be used in a common way: either using the WYSIWYG editor or text mode.