Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

This page contains useful tips to create themes that will be compatible with future versions of JIRA and Confluence:

Table of Contents


Learn from existing Extensions

Look into the Sample Extensions to see how other extensions work. And read the detailed blogpost about how the "Language Switcher Extension" has been built.

Increase the probability of compatibility for your extension

  • Styles
    • Use the very common html containers of the application:
      • #header
      • #footer
      • #main
    • Do not style into the very little end of the applications html
    • Do not rely on a specific container hierarchy:
      • #div1 > h1 > ul > li > a
    • Each style needs to have a specific context id to start
      • #header .examplediv
      • #main #examplediv
  • Javascript
    • Use only one "AJS.toInit" function as a kind of "main" function
      • call up all your container move functions from this function
  • Template
    • Create a specific container div id to include your backend code:
      • <div id="my-special-unique-container" ></div>

Troubleshooting

  • If your Template content is not available in the html
    • search the html for "Error during template resource parsing!"
    • If this string is present please check the logs for further information

 

Scope your Template HTML 

If your Extension HTML should only be available in certain pages 

  • You can scope the Template code to a specific action or URL
Code Block
#Confluence
## example HTML only for Dashboard
#if($req.getRequestURL().toString().endsWith("dashboard.action"))
	your scoped HTML
#end
 
#JIRA
## example HTML only for Dashboard
#if($request.getRequestURL().toString().endsWith("Dashboard.jspa"))
	Your HTML code
#end


 

  • Your can Scope your Application to a specific Context
Code Block
#Confluence
## example HTML only for space with key "ds"
#if($space.key.equals("ds"))
	your scoped HTML
#end


#JIRA
## example HTML only for project with key "DEMO"
#if($project.key.equals("DEMO"))
	Your HTML code
#end