问题
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