This page tells you how to create a user macro that displays the text 'Hello World!' and any text that the user places in the body of the macro. For full details about creating a user macro, see the guide to writing user macros.
Defining the 'Hello World' user macro
To create the 'Hello World' user macro:
- Choose the cog icon
at top right of the screen, then choose Confluence Admin.
- Choose User Macros in the left-hand panel.
- Choose Create a User Macro at the bottom of the list of macros.
- Enter the macro attributes as follows:
- Macro Name:
helloworld
- Visibility:
Visible to all users in the Macro Browser
- Macro Title:
Hello World
- Description:
Displays "Hello World" and the macro body.
- Categories:
Confluence Content
- Icon URL: You can leave this field empty.
- Documentation URL: You can leave this field empty.
- Macro Body Processing:
Rendered
Template:
## @noparams Hello World! $body
- Macro Name:
- Choose Save.
The information on this page does not apply to Confluence OnDemand.
Screenshot: Defining the 'Hello World' user macro
Using the 'Hello World' macro on a page
Now you can add the macro to your Confluence page using the Macro Browser.
The result is:
You can also use autocomplete to add the macro onto your page: start typing '{hello' in the editor, and select the 'Hello World' macro from the list of suggestions that appears.
Attachments:











