This page last changed on Jun 18, 2010 by gcheck.
This page describes a way of preventing your space administrators from changing the theme in a space. In this way, you can ensure that all spaces follow the global look and feel.
 | Customisations are not supported Note that Atlassian support does not cover customisations to Velocity files, such as those described on this page. |
 | All files should be located under <confluence-home>\confluence\spaces. |
Removing the Theme Selection Option
To remove the option that allows people to select a theme for a space, you will need to edit the Velocity template (.vm file) as described below.
- Locate your choosetheme.vm file under
<confluence_home>\confluence\spaces\choosetheme.vm
- Edit this file with your favorite editor, such as Wordpad, Notepad or Notepad++ (recommended). The file looks something like this:
<html>
<head>
<title>$action.getActionName($action.getClass().getName())</title>
</head>
#applyDecorator("root")
#decoratorParam("helper" $action.helper)
#decoratorParam("context" "space-administration")
#decoratorParam("mode" "view-space-administration")
#decoratorParam("help-path" "/spaces/help/choosetheme.vm")
<body>
#applyDecorator ("root")
#decoratorParam ("context" "spaceadminpanel")
#decoratorParam ("selection" "choosetheme")
#decoratorParam ("title" $action.getActionName($action.getClass().getName()))
#decoratorParam ("selectedTab" "admin")
#decoratorParam("helper" $action.helper)
<form method="POST" action="dochoosetheme.action" name="choosethemeform">
#form_xsrfToken()
#parse ("/includes/common-choosetheme.vm")
<input type="hidden" name="changesSaved" value="true">
#tag ("Submit" "value='confirm.name'" "align='center'" "theme='notable'" "template='submit.vm'")
</form>
#end
</body>
#end
</html>
- Add a comment, as shown below, replacing the block that starts with "<form method..." and ends with "</form>". After the edit, you should have something like this:
<html>
<head>
<title>$action.getActionName($action.getClass().getName())</title>
</head>
#applyDecorator("root")
#decoratorParam("helper" $action.helper)
#decoratorParam("context" "space-administration")
#decoratorParam("mode" "view-space-administration")
#decoratorParam("help-path" "/spaces/help/choosetheme.vm")
<body>
#applyDecorator ("root")
#decoratorParam ("context" "spaceadminpanel")
#decoratorParam ("selection" "choosetheme")
#decoratorParam ("title" $action.getActionName($action.getClass().getName()))
#decoratorParam ("selectedTab" "admin")
#decoratorParam("helper" $action.helper)
<h1>Dear Space Administrator,</h1><br>
<p><font size="3" color="red">You cannot change this Theme, we took so much effort building our Theme.<br>
Please continue to use the Global Look and Feel<br>
If you have any complains contact the Admin.<br>
Regards your Admin.<br></font></p>
#end
</body>
#end
</html>
- Save the file. You can reload your page and see the changes. There is no need to restart Confluence.
After following the above steps, you will have something like this:

 | Congratulations, that's it Have a chocolate! |
|