18 April, 2011

Facebook Like Box

Put the below code in your portlet to make working facebook like-box.
Also you can configure height,width and account-URL from liferay configuration.
See below screen shots :

<fb:like-box href="<%=faceBookURL!=null ? faceBookURL : PortletProps.get("default.url") %>" width="<%=width!=null ? width : PortletProps.get("default.width") %>" height="<%=height!=null ? height : PortletProps.get("default.height") %>" show_faces="true" stream="false" header="true"> </fb:like-box>

06 April, 2011

Twitter portlet in Liferay

I have create twitter widget in liferay for showing the timeline (tweets)
if you need more information put the comment.
Please see below image for twitter timeline update integration with liferay :

Get portlet preference

In many cases we need to find portlet preferences.
Below is the code which can help to find portlet preferences.

PortletPreferences preferences = renderRequest.getPreferences();
String portletResource = ParamUtil.getString(request, "portletResource");
if (Validator.isNotNull(portletResource)) {
preferences = PortletPreferencesFactoryUtil.getPortletSetup(request, portletResource);

Create Servlet Project as Module

You would have seen that many times we are writing out own servlet in Liferay portal to achieve some specific use case. In DXP, You can st...