Posts

Showing posts from January, 2016

Display portlet as popup in theme

Step 1: Open the portal-normal.vm file and write the below code.  portal-normal.vm  #set ($popupUrl = $portletURLFactory.create($request, " login_WAR_portlet ",$page.getPlid(), "RENDER_PHASE")) $popupUrl .setParameter("p_p_state", "exclusive") $popupUrl .setPortletMode("view")    <a href="#" onClick = "showPopup()">Show Popup </a> where ' login_WAR_portlet ' is the portlet name .     Step 2: Write the javascript code for popup in portal-normal.vm or any other .js file. < aui:script > AUI().use('aui-base', 'aui-io-plugin-deprecated', 'liferay-util-window', function(A) { function showPopup(){ var popUpWindow=Liferay.Util.Window.getWindow( { dialog: { centered: true, constrain2view: true, //cssClass: 'yourCSSclassName', modal: true, resizable: false, width: 475 }