Confluence 5.7 has reached end of life
Check out the [latest version] of the documentation
Gadgets are small applications that can offer dynamic content. They are typically served from a web application server and can be re-used in many other web applications. In Confluence, use the Gadget macro to add gadgets to pages or blog posts.
Confluence comes bundled with a few of its own gadgets that you can add to your pages or blog posts. The Confluence gadgets are listed in Confluence Gadgets. However, you can access additional gadgets in this list if your Confluence Administrator has:
Unlike other macros, the name of each gadget macro is unique and follows the convention "<gadget-name> macro", where <gadget-name> is the name supplied by the gadget itself.
To add a gadget to a page:
To edit an existing gadget on a page or blog post:
Almost all gadgets allow you to set basic parameters (listed below), which appear on the right of the macro dialog. Each gadget may also have its own set of parameters, which appear on the left of the macro dialog.
Parameter | Default | Description |
|---|---|---|
Width | 450 pixels | Set the width of the gadget, using one of the following conventions:
|
Border | true | Places a thin grey border around the gadget. |
In the addition to the standard parameters, the gadget macro contains 'parameter-like' content, which represents specific property settings that are particular to each gadget. Hence they are not documented here. Typically, this content would only be changed by customising the gadget's default properties using the macro browser.
The following examples are provided for advanced users who want to inspect or edit the underlying markup for a Confluence page.
Macro name: gadget
Macro body: None.
The following additional parameters are available in storage format and wikimarkup.
| Parameter name | Required | Default | Parameter description and accepted values |
|---|---|---|---|
url | Yes | (none) | This is the location of the gadget specification (XML file). |
preferences | No | (Gadget-dependent) | Specific property settings that are particular to each gadget. |
A note about editing a gadget's properties (preferences) in markup: It is possible to edit the values of these properties directly in the wiki markup or storage format. However, this will allow the entry of invalid values. If a gadget property supports a certain set of values, the macro browser will restrict the user to selecting only valid values for that property. For that reason, we recommend that you use the macro browser to edit a gadget's properties.
This example shows the Confluence Page gadget:
<ac:structured-macro ac:name="gadget"> <ac:parameter ac:name="width">500</ac:parameter> <ac:parameter ac:name="border">false</ac:parameter> <ac:parameter ac:name="url">rest/gadgets/1.0/g/com.atlassian.confluence.plugins.gadgets:confluence-page-gadget/gadgets/confluence-page-gadget.xml</ac:parameter> <ac:parameter ac:name="preferences">spaceName=Documentation&spaceKey=DOC&quickfind-space=Documentation&pageId=753666&pageName=Documentation%20Home&quickfind-page=Documentation%20Home&isEditable=true&isConfigured=true&refresh=15&showLink=false</ac:parameter> </ac:structured-macro>
This example shows the Confluence News gadget:
<ac:structured-macro ac:name="gadget"> <ac:parameter ac:name="url">rest/gadgets/1.0/g/com.atlassian.confluence.plugins.gadgets:confluence-news-gadget/gadgets/confluence-news-gadget.xml</ac:parameter> <ac:parameter ac:name="preferences"/> </ac:structured-macro>
This example shows the Confluence Page gadget:
{gadget:width=500|border=false|url=rest/gadgets/1.0/g/com.atlassian.confluence.plugins.gadgets:confluence-page-gadget/gadgets/confluence-page-gadget.xml} spaceName=Documentation&spaceKey=DOC&quickfind-space=Documentation&pageId=753666&pageName=Documentation%20Home&quickfind-page=Documentation%20Home&isEditable=true&isConfigured=true&refresh=15&showLink=false {gadget}
This example shows the Confluence News gadget:
{gadget:url=rest/gadgets/1.0/g/com.atlassian.confluence.plugins.gadgets:confluence-news-gadget/gadgets/confluence-news-gadget.xml} {gadget}