Event Listener module
Job module
Language module
Macro Module
Theme module
Web UI modules
Workflow module

Content Template module

Applicable:

Confluence 5.1 and later

Purpose of this module

This module must be used with the Blueprint module or Space Blueprint module. 

Configuration

The root element for this module is content-template

Element: content-template

Attribute*

Description

key

Identifies the plugin module. This key must be unique within your plugin.

Default: None

i18n-name-key

The localisation key for the human-readable name of the plugin module.

Default: None

* key is required

The content-template element can have the following child elements:

Element*

Description

resource

Defines the location of the content-template. See the resource module definition for information on this module. Define the template content in an XML file. The file can contain any valid Confluence storage format markup.  The template file can live anywhere in your plugin project, by convention though, you should place it with the other project resources, for example in a src/main/resources/template folder.  

Default: None

context-provider

Specifies the class that implements the com.atlassian.plugin.web.ContextProvider interface. The context provider specifies what the content template is rendered with.

* resource is required

Example:

For example, you might create a src/main/resources/templates/basic.xml file with the following content:

1
2
 <p>hello world!</p>

Then, in your atlassian-plugin.xml file, you specify a content-template module:

1
2
<content-template key="myplugin-template" i18n-name-key="myplugin.templates.content.name">
  <resource name="template" type="download" location="templates/basic.xml"/>
</content-template> 

For details on creating your own blueprint, see Confluence Blueprints in this documentation.

Rate this page: