Confluence Docs 3.0 : Hello World Example of User Macro This page last changed on Dec 11, 2007 by smaddox. There are two ways to write a macro: The first way is to create a user macro. You need to be a Confluence Administrator to do this. Below is an example. The second, and more difficult, way is to create a user plugin. ## Example of a User Macro Here's how you can create a user macro which displays the text 'Hello World : ' in front of any variable text you place between the macro tags. Go to the 'Administration Console' and click 'User Macros' under 'Configuration' in the left-hand panel. Click 'Create a User Macro' at the top of the list of macros. Enter the macro attributes as shown in the following screenshot. Click the 'Save' button. So, now you can add the following Wiki Markup on your Confluence page:
    {helloworld}Matthew{helloworld}
And the result will be as follows: ## More Information The macro itself is written in the Velocity Templating Language. You can find more information in the Velocity User Guide from Apache. ##### RELATED TOPICS User Macros Macro Plugins Attachments: helloWorldOutput.PNG (image/png) helloworldMacro.PNG (image/png) helloworldMacro.PNG (image/png)

Document generated by Confluence on Nov 05, 2009 23:34