【问题标题】:JSPs that render articles in Liferay 6在 Liferay 6 中呈现文章的 JSP
【发布时间】:2013-04-26 09:35:53
【问题描述】:

我想在一个挂钩中覆盖在 Liferay 6 中呈现文章的 JSP,以在每篇文章上显示一个自定义字段。在 String_PAGE 常量中 liferay-portal-src-6.0.6\util-taglib\src\com\liferay\taglib\ui\JournalArticleTag.java。 有一个 JSP,我认为它是我需要覆盖的。 JSP 在这里找到: liferay-portal-src-6.0.6\portal-web\docroot\html\taglib\ui\journal_article\page.jsp.

我覆盖了这个 JSP,但是在加载文章时没有可见的变化。

我想知道这是否是正确的 JSP,或者我做的不对。

【问题讨论】:

  • Liferay 中没有一个单一的jsp 可以在所有地方呈现文章。有多个 jsps ,对于每个 portlet 来说都是分开的,比如控制面板中的 Web 内容它的 html\portlet\journal\view_article.jspFor Web Content Display its: html\portlet\journal_content\view.jsp
  • 嗨,Pankaj,谢谢你的回答!您能否详细说明如何找到我需要的所有 JSP,我对 Liferay 不是很熟悉。在 liferay-portal-src-6.0.6\portal-web\docroot\html\portlet\journal\ 我找到了 view.jsp 但没有 view_article.jsp。在 liferay-portal-src-6.0.6\portal-web\docroot\html\portlet\journal_content 我找到了 view.jsp。

标签: java jsp liferay-6


【解决方案1】:

对于 Web 内容显示 portlet,您需要覆盖此 jsp:

...\html\portlet\journal_content\view.jsp

github:https://github.com/liferay/liferay-portal/blob/master/portal-web/docroot/html/portlet/journal_content/view.jsp

这里是如何覆盖 jsp 的文档:

http://www.liferay.com/documentation/liferay-portal/6.1/development/-/ai/overriding-a-j-4

【讨论】:

  • 嗨,Mark,您在 Web Content Display 上确实是对的。你知道我需要为 Asset Publisher 覆盖的 JSP 是什么吗?谢谢!
  • 我在 Asset Publisher 上找到了答案。我遇到了liferay.com/community/forums/-/message_boards/message/6643194,我设法通过覆盖 liferay-portal-src-6.0.6\portal-web\docroot\html\portlet\asset_publisher\display\abstracts.jsp 和 liferay-portal-src 在界面上添加了一些东西-6.0.6\portal-web\docroot\html\portlet\asset_publisher\view_content.jsp
猜你喜欢
  • 1970-01-01
  • 2011-09-20
  • 1970-01-01
  • 2017-02-22
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-07-01
相关资源
最近更新 更多