Describes a parameter input field for a macro.
Any declared parameters must also be included in the URL value of the macro in order to serialise this value, for
example, for a macro with a parameter view
it should be added to the macro url as follows:
1 2 3 4 5 6 7
"dynamicContentMacros": [{
...
"url": "/render-map?pageTitle={page.title}&viewChoice={view}",
...
}]
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
{
"dynamicContentMacros": {
"renderModes": {},
"url": "/my-macro",
"categories": [],
"outputType": "block",
"bodyType": "none",
"aliases": [],
"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"
],
"hidden": false,
"indexing": {
"enabled": true
}
}
],
"name": {
"value": "My macro with placeholder"
},
"key": "my-macro-key"
}
}
identifier
Type | |
Required | Yes |
Pattern | [-_a-z0-9\.]+ |
Description | A unique identifier for the parameter. It must only contain lowercase alphanumeric characters, dashes, underscores, dots and must not contain any spaces. This identifier will be used in the query parameters of the add-on URL. |
name
Type | |
Required | Yes |
Description | The human readable name of the parameter which will be displayed in the UI. Represents a string that can be resolved via a localization properties file. You can use the same Example1 2 3 4
|
value |
| ||||||||
i18n |
|
type
Type | |
Required | Yes |
Allowed values |
|
Description | The type of parameter. Currently the following parameter types are supported in the macro browser's UI:
* |
aliases
Type | |
Description | Aliases for the macro parameter. |
defaultValue
Type | |
Max length | 1000 |
Description | The default value for the parameter. |
description
Type | |
Description | The description of the parameter Represents a string that can be resolved via a localization properties file. You can use the same Example1 2 3 4
|
value |
| ||||||||
i18n |
|
hidden
Type | |
Defaults to | false |
Description | Determines if the parameter will be displayed in the macro editor. |
indexing
Type | |
Description | Defines how this macro parameter will be indexed Defines how this macro parameter will be indexed for site search 1 2 3 4
The macro parameter indexing property allows apps to hook into the mechanism by which Confluence populates its search index for site search. Each time macro is created or updated in Confluence, the value that is stored in the macro parameter will be added to the search index. The value of this macro parameter will also be used in displaying the excerpt text for search result. This is useful when the body of the macro is not searchable, for example: macros with |
enabled |
|
multiple
Type | |
Defaults to | false |
Description | Whether it takes multiple values. |
required
Type | |
Defaults to | false |
Description | Whether it is a required parameter. |
values
Type | |
Description | Describes the |
Rate this page: