1
如何通過WebContentDisplay-Portlet隱藏某些配置選項卡。我只會讓主配置和停用其餘選項卡或隱藏它們。Liferay WebContentDisplay - Portlet - 隱藏配置選項卡
如何通過WebContentDisplay-Portlet隱藏某些配置選項卡。我只會讓主配置和停用其餘選項卡或隱藏它們。Liferay WebContentDisplay - Portlet - 隱藏配置選項卡
如果你想隱藏的所有Portlet的配置比你如果你想隱藏它添加到你的CSS
#_86_tabs1supported-clientsTabsId,
#_86_tabs1permissionsTabsId,
#_86_tabs1sharingTabsId,
#_86_tabs1scopeTabsId {
display: none;
}
,甚至不使它們比你的標籤應建立掛鉤,並在其中修改這個JSP
/portal-src/portal-web/docroot/html/portlet/portlet_configuration/tabs1.jsp
,也看看
/portal/portal-web/docroot/html/portlet/portlet_configuration/init.jsp
對於例如,在tabs1.jsp找到
if (Validator.isNotNull(selPortlet.getConfigurationActionClass())) {
tabs1Names += ",setup";
request.setAttribute("liferay-ui:tabs:url" + pos++, configurationURL.toString());
}
低於進入
boolean showSystemTabs = true;
if ("56".equeals(portletResource)) {
showSystemTabs = false;
}
注意到56是 「網頁內容顯示」 Portlet的ID。
這之後你可以改變(在其下方)
if (selPortlet.hasMultipleMimeTypes()) {
tabs1Names += ",supported-clients";
request.setAttribute("liferay-ui:tabs:url" + pos++, supportedClientsURL.toString());
}
到
if (selPortlet.hasMultipleMimeTypes() && showSystemTabs) {
tabs1Names += ",supported-clients";
request.setAttribute("liferay-ui:tabs:url" + pos++, supportedClientsURL.toString());
}
和相同的邏輯爲其他選項卡。
請注意,掛鉤適用於所有社區,用戶頁面...