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

Required

Description

Default

key

(tick)

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

None

i18n-name-key
(error) The localisation key for the human-readable name of the plugin module. None

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

Element

Required

Description

Default

resource

(tick)

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.  

None

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

Example:

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

 <p>hello world!</p>

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

<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.

Was this page helpful?

Have a question about this article?

See questions about this article

Powered by Confluence and Scroll Viewport