legacy-knowledge-base
公開されました Jul. 2, 2025

管理テーマを変更するにはどうすればよいですか?

written-by

Daniel Mijarra

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

legacy-article

learn-legacy-article-disclaimer-text

問題

  • たとえば、Web コンテンツ エディションのルック アンド フィールを変更するなど、admin-theme のいくつかの側面を変更する必要がある場合があります。

Environment

  • ライフレイDXP 7.0、7.1

解決策

  • admin-theme は直接変更できません。admin-theme に基づいて新しいテーマを作成してから、この新しいカスタム admin-theme を変更する必要があります。
  • custom-admin-themeを作成する手順:
    1. この記事 テーマの作成で説明されている手順に従って、新しいテーマを作成します。 custom-admin-theme がその名前として使用されます。
    2. 次のフォルダーを LIFERAY_SRC_7_x/modules/apps/frontend-theme/frontend-theme-admin/src から custom-admin-theme/src フォルダーにコピーします。
      CSS
      Templates
      Images
    3. /src/WEB-INF/liferay-look-and-feel.xml を編集し、次のように、タグ <theme>...</theme> の間に含まれる xml タグを <control-panel-theme>true</control-panel-theme>に置き換えます。
      <?xml version="1.0"?>
      <!DOCTYPE look-and-feel PUBLIC "-//Liferay//DTD Look and Feel 7.1.0//EN" "http://www.liferay.com/dtd/liferay-look-and-feel_7_1_0.dtd">

      <look-and-feel>
      <compatibility>
      <version>
      7.1.0+
      </version>
      </compatibility>
      <theme id="custom-admin-theme" name="custom-admin-theme">
      <control-panel-theme>
      true
      </control-panel-theme>
      </theme>
      </look-and-feel>
    4. 必要な変更を加えます。 たとえば、一部の CSS を変更するには、 /src/css/_custom.scss を編集し、必要な CSS ルールを追加または変更します。
    5. custom-admin-theme コンパイルし、Liferay にデプロイします。
    6. 新しいテーマを適用するには、 コントロール パネル > 構成 > インスタンス設定 > その他 > ルック アンド フィール > デフォルト コントロール パネル テーマ にアクセスし、 custom-admin-themeを選択します。
did-this-article-resolve-your-issue

legacy-knowledge-base