Modify or Create Templates
Before modifying or creating templates you should know the following:
- All templates are so called Velocity templates as described here.
- All templates must generate XHTML, otherwise Confluence will refrain from accepting the to be published page.
- The
<!DOCTYPE...>
shall be omitted since Confluence will add this during publishing - The HTML tags for
<html> <head> <body> <title>
shall be omitted since Confluence will add this during publishing - Any
<script>
or<link>
tags relating to Javascript, Fonts, CSS and alike shall be omitted since Confluence is very likely to refrain from accepting the to be published page.
- The
- Velocity makes strong use of Java Objects and a lot of the templates rely on the use of calling Java objects functions and accessing or converting values properly.
- The following Java objects will be availabe during the template run:
$helper
: an instance of the Helper$i18n
: an instance if the Jira I18nHelper$project
: the instance of the current Jira project$settingsUrl
: a String containing the complete URL pointing to the settings page of the current Jira project$globalContext
: a map containing global entries- It may be empty
- You may put key + value pairs into this map to persist during subsequent Velocity renderings
- Any object you put as key + value pairs into the
$extraContext
when you call$helper.renderMacroTemplate(...)
- The following Java objects will be availabe during the template run:
- The Javadoc describes the so called Application Programming Interface (API) of some of the available Java objects during the runtime of the rendering ending.
- Some of the Links inside the Javadoc point directly to Atlassian's or Oracle's own Javadoc Pages.
- The matching Javadoc for the Teamworkx Configuration Publisher can be dowloaded here: apidocs.zip
The ZIP-archive, once unpacked, contains a subfolder containing the output from the java command javadoc. Simply open the index.html with any webbrowser and you can browse the documentation:
Do the following:
Modify Existing Templates
Modifying templates is not as hard as it seems since often copy & paste will do the job.
Please copy the required templates from the Jira admin Interface:
and modify them accordingly.
Please mind that the templates are using so called macros to render smaller parts thus making the files themselves smaller and macros are re-used in different templates.
After applying your changes, please upload your work through the TWX Config Pub Template Import dialog.
Create New Templates
Creating new templates requires some fundamental knowledge about Velocity and Java, see below for details.
You may create as many new templates as you want, there is no limitation, apart from the space in you database, to the amount of templates.
Please upload your work through the TWX Config Pub Template Import dialog.