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

フラグ付き掲示板の投稿について送信されるメールのテンプレートをカスタマイズしたいのですが、どうすればいいですか?

written-by

Tímea Bihari

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

問題

  • ユーザーがメッセージボードで不適切なメッセージにフラグを立てると、管理者ユーザーはメールで通知を受け取ります。
  • このメールテンプレートの件名と本文をカスタマイズしたいのですが、どうすればいいですか?

環境への配慮

  • DXP 7.1

決議

  • オリジナルファイルは以下の場所にあります。\liferay_home\osgi\marketplaceLiferay Collaboration - Liferay Flags - Impl.lpkgcom.liferay.flags.service-version.jarcom\liferayflags\dependencies (email_flag_body.tmpl & email_flag_subject.tmpl)
  • テンプレートを変更するには、これらのファイルをオーバーライドする必要があります。
  • 以下の手順でフラグメントモジュールを作成する必要があります(オリジナルのドキュメント: フラグメントテンプレート)。
  1. フラグメントモジュールを作成します。
    blade create -t fragment -h com.liferay.flags.service -H 3.0.9 FlagsCustomMailTemplate
  2. カスタマイズしたテンプレートファイルを src\main\resourcescomliferay\flagsdependencies (custom_email_flag_body.tmpl & custom_email_flag_subject.tmpl)
  3. を使ってプロジェクトを構築します。
    gradlew build
  4. jarファイルは のbuildlibs ディレクトリに作成されます。
  5. 作成したjarをデプロイします (flagscustommailtemplate-1.0.0.0.jar)
  6. Control Panel > Instance Settings > Community Toolsへ行き、 テンプレートファイルの設定を次のように変えます:
    Email Body: com/liferay/flags/dependencies/custom_email_flag_body.tmpl
    Email Subject: com/liferay/flags/dependencies/custom_email_flag_subject.tmpl
    Control Panel in DXP 7.3:
    メニュー.pngControlPanel.png

追加情報

did-this-article-resolve-your-issue

legacy-knowledge-base