How to remove borders of a portlet added using <liferay:runtime … /> tag

一个人想着一个人 提交于 2019-12-24 07:28:36

问题


I'm trying to add a custom portlet in a JSP using tag, here is the code:

<liferay-portlet:runtime portletName="customSocialNotifications_WAR"  />

That works fine! But the portlet is showing the borders, and I need to hide them.

I tried to overwrite CSS, but then he removes all the borders of the portal :(

Some idea?

Thanks!

PD: I'm using Liferay 6.2 EE ;)


回答1:


You can use a attribute available in same tag as defaultPreferences

<%
StringBundler sb = new StringBundler();
sb.append("<portlet-preferences >");
sb.append("<preference>");
sb.append("<name>");
sb.append("portletSetupShowBorders");
sb.append("</name>");
sb.append("<value>");
sb.append("false");
sb.append("</value>");
sb.append("</preference>");
sb.append("</portlet-preferences>");
%>


<liferay-portlet:runtime portletName="customSocialNotifications_WAR"  defaultPreferences="<%=sb.toString()%>"/>


来源:https://stackoverflow.com/questions/25769758/how-to-remove-borders-of-a-portlet-added-using-liferayruntime-tag

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!