Documentation
Macro Input Parameter
Describes a parameter input field for a macro.
#### Example{
"dynamicContentMacros": [
{
"width": "200px",
"height": "200px",
"url": "/render-map?pageTitle\u003d{page.title}",
"description": {
"value": "Shows a configurable map"
},
"icon": {
"width": 80,
"height": 80,
"url": "/maps/icon.png"
},
"documentation": {
"url": "http://docs.example.com/addons/maps"
},
"categories": [
"visuals"
],
"outputType": "block",
"bodyType": "none",
"aliases": [
"map"
],
"featured": true,
"parameters": [
{
"identifier": "view",
"name": {
"value": "Map View"
},
"description": {
"value": "Allows switching between view types"
},
"type": "enum",
"required": true,
"multiple": false,
"defaultValue": "Map",
"values": [
"Map",
"Satellite"
]
}
],
"editor": {
"url": "/map-editor",
"editTitle": {
"value": "Edit Map"
},
"insertTitle": {
"value": "Insert Map"
}
},
"name": {
"value": "Maps"
}
}
]
}
Properties
name
Type
Required
Yes
Description
The human readable name of the parameter which will be displayed in the UI.
identifier
Type
string[-_a-z0-9\.]+Required
Yes
Description
A unique identifier for the parameter. It has to be all lowercase, and must not contain any spaces. This identifier will be used in the query parameters of the add-on URL.
type
Type
stringRequired
Yes
Description
The type of parameter.
Currently the following parameter types are supported in the macro browser's UI: *attachment: displays an autocomplete field for search on attachment filenames.
* boolean: displays a check box.
* confluence-content: displays an autocomplete field for search on page and blog titles.
* enum: displays a select field.
* spacekey: displays an autocomplete field for search on space names.
* string: displays an input field (this is the default if unknown type).
* username: displays an autocomplete field for search on username and full name.aliases
Type
[
string, … ]Description
Aliases for the macro parameter.
defaultValue
Type
stringDescription
The default value for the parameter.
description
Type
Description
The description of the parameter
multiple
Type
booleanDefaults to
falseDescription
Whether it takes multiple values.
required
Type
booleanDefaults to
falseDescription
Whether it is a required parameter.
values
Type
[
string, … ]Description
Describes the enum values - only applicable for enum typed parameters.