legacy-knowledge-base
公開されました Sep. 10, 2025

特定の組み込みポートレットを無効化する

written-by

Liferay Support

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

Liferayは、ユーザーが自分のページに追加できる様々なポートレットをすぐに装備しています。 しかし、様々な理由により、管理者はこれらのポートレットの一部を利用可能なポートレットのプールから削除したいと思うかもしれません。

幸い、これはコントロールパネルか、Liferay内の.xmlファイルを編集することで実現可能です。

解像度

方法1:コントロールパネル

  1. コントロールパネルを開く。
  2. コンフィギュレーションに移動します。
  3. 目的のポートレットを非アクティブに設定する

方法2:XMLを編集する

  1. {$LIFERAY_HOME}\tomcat-7.0.25webapps\ROOTWEB-INF に移動し、 liferay-portlet.xmlを配置する. このファイルには、ポートレットを無効化するために必要な情報が含まれています。
  2. このフォルダに liferay-portlet-ext.xml ファイルを作成します。 liferay-portlet.xml ファイルを直接編集しないようにしてください。 liferay-portlet-ext.xml で設定した内容は、 liferay-portlet.xml のファイルより優先されます。
  3. liferay-portlet-ext.xml を以下の内容で編集してください:

<?xml version="1.0"?>

<!DOCTYPE liferay-portlet-app PUBLIC "-//Liferay//DTD Portlet Application 5.1.0//EN" "http://www.liferay.com/dtd/liferay-portlet-app_5_1_0.dtd">

<liferay-portlet-app>

<portlet>
<portlet-name>1</portlet-name>
<struts-path>mail</struts-path>
<include>false</include>
</portlet>

</liferay-portlet-app>

ここで、"1 "はポートレット番号に対応する値、"mail "はポートレット名に対応する値です。 これらの対応する値は、 liferay-portlet.xml ファイルに記載されています。 ポートレット名は、ポートレットID( http://www.liferay.com/community/wiki/-/wiki/Main/Portlet+IDs)で確認することができます。

例えば、Documents and Media ポートレットを無効にしたい場合、 liferay-portal-ext.xmlに以下のように記述します。

<?xml version="1.0"?>

<!DOCTYPE liferay-portlet-app PUBLIC "-//Liferay//DTD Portlet Application 5.1.0//EN" "http://www.liferay.com/dtd/liferay-portlet-app_5_1_0.dtd">

<liferay-portlet-app>

<portlet>
<portlet-name>20</portlet-name>
<struts-path>document_library</struts-path>
<include>false</include>
</portlet>

</liferay-portlet-app>

did-this-article-resolve-your-issue

legacy-knowledge-base