Databases Reference
In-Depth Information
Parameters
It is possible to use parameters in your user macro, so that users can pass extra
information for you to render. If you define your parameters, Confluence will
display the corresponding fields in the Macro properties dialog and browser.
A parameter definition in the template consists of three parts:
@param - to let Confluence know we are defining a parameter
• Name - to access the parameter's value in your template
• Extra attributes - to further describe your parameter
Parameters are generally defined at the top of the template, just below the header.
The order in which you specify the parameters is also the order in which they are
displayed in the parameter section (the right-hand side) in the Macro Browser.
## @paramTitle:title=Title|type=string|desc=What is the title for
the Teaser
As you may have noticed, there are quite a few extra attributes you can use to
describe your parameter. The more you specify, the better Confluence can help
your users with the Macro Browser and properties editor. Let's go over the
available attributes:
Attribute name
Description
Required?
[unnamed first
attribute]
The parameter name is the first attribute, and
doesn't require a name.
## @param example
Will define the parameter example .
Required
title
The parameter title that will appear in the Macro
Browser. If no title is specified, the parameter name
is used.
Recommended
type
The field type of the parameters. Learn about types
in the next pages.
Recommended
desc
The description of the parameter shown in the
Macro Browser.
Optional
required
Specify if the parameter is required; default is false .
Optional
multiple
Specify if the parameters allows multiple values;
default is false .
Optional
default
The default value of the parameter.
Optional
Search WWH ::




Custom Search