Defines where the blueprint template is located and the context for variable substitution.
1 2 3 4 5 6 7 8 9
{
"template": {
"url": "/blueprints/blueprint.xml",
"blueprintContext": {
"url": "/blueprints/context"
}
}
}
url
Type | |
Format | uri |
Required | Yes |
Description | The URL of the add-on resource that provides the blueprint template content. This URL has to be relative to the add-on base URL. |
blueprintContext
Type | |
Description | Defines the add-on server endpoint that provides the JSON objects used for substituting variables in the blueprint template.
For more information on defining variables in blueprint templates, check out the examples in Blueprint Template Context. Defines the context of the blueprint template. 1 2 3 4 5 6 7 8 9
A blueprint template is static - the same template will produce the same Confluence page. To produce Confluence pages dynamically (to create a different page for a different user), the template needs to use variable substitution to produce the dynamic parts. Variable substitution requires the add-on to provide data for substitution. Collectively, this data is called the context for substitution.
The context is made up of a list of objects which are retrieved from the context url specified by the blueprint
context Substituting dynamic variables in a blueprint
Let's say we have a blueprint template module 1 2 3 4 5
And an add-on server resource 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
During blueprint page creation, Confluence sends a POST request to The final, variable substituted, storage format will look like this: 1 2 3 4 5
This is then used as the Confluence page to be saved to the database and displayed to the user according to the
An error message appears in the Content Create Dialog if Confluence has any problems accessing the blueprint template or context URL (for example if your add-on server failed to respond in 10 seconds or the JSON returned is invalid). A detailed error and/or stacktrace may be accessible by Atlassian support, but the end user will see an error like the one shown here: Backwards compatibility of the
A blueprint template containing variables may change as the add-on evolves over time. However, because end users
can customize blueprint templates, it's possible for the customized version of the template to differ from
the version in the add-on. This difference won't cause an error as long as the variables used in the template are
still being returned as part of the context url.
|
url |
|
Rate this page: