テーマ選択を無効にする方法
プラットフォームについて: Data Center - この記事は、Data Center プラットフォームのアトラシアン製品に適用されます。
このナレッジベース記事は製品の Data Center バージョン用に作成されています。Data Center 固有ではない機能の Data Center ナレッジベースは、製品のサーバー バージョンでも動作する可能性はありますが、テストは行われていません。サーバー*製品のサポートは 2024 年 2 月 15 日に終了しました。サーバー製品を利用している場合は、アトラシアンのサーバー製品のサポート終了のお知らせページにて移行オプションをご確認ください。
*Fisheye および Crucible は除く
目的
When you want all spaces to follow the global look and feel, this page describes a way of preventing your space administrators from changing the theme in a space.
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-install>\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_install>\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: