Plain Popup URL

Gunnar Brinkmann, modified 5 Years ago. Junior Member Posts: 54 Join Date: 12/2/11 Recent Posts
Hello,
we want to open a portlet popup via URL (not from another portlet).
Minimum parameters seem to be p_p_state and p_p_id like in
liferayportal/liferaypage?p_p_state=pop_up&p_p_id=PORTLET_ID
- are plain url popup calls OK?
- are these parameters sufficient or should we add for example p_p_lifecycle, p_p_mode and/or others?
Regards,
Gunnar
thumbnail
Mohammed Yasin, modified 5 Years ago. Liferay Master Posts: 593 Join Date: 8/8/14 Recent Posts
Hi ,You can use below code for forming url
[code]<portlet:renderurl var="popupUrl" windowstate="<%=LiferayWindowState.POP_UP.toString() %>">
 <portlet:param name="mvcPath" value="/test.jsp" />
</portlet:renderurl>
refer below urls  for pop up
https://www.liferaystack.com/2017/09/aui-popup-and-aui-modal-dialog-in-liferay-7.html
http://www.javasavvy.com/lifeay-aui-popup-sample-code/
Gunnar Brinkmann, modified 5 Years ago. Junior Member Posts: 54 Join Date: 12/2/11 Recent Posts
Thank you, but as I wrote, we want to open the popup via plain URL, not via another portlet.
Regards,
Gunnar
thumbnail
Mohammed Yasin, modified 5 Years ago. Liferay Master Posts: 593 Join Date: 8/8/14 Recent Posts
If you want just create url for Layout then you can add respected plid of the page
<liferay-portlet:renderurl plid="" windowstate="<%=LiferayWindowState.POP_UP.toString() %>"   var="plainURL"></liferay-portlet:renderurl>

Gunnar Brinkmann, modified 5 Years ago. Junior Member Posts: 54 Join Date: 12/2/11 Recent Posts
Mohammed, do you understand my question?
We don't want to open the popup via tags or portlet.
Imagine a plain URL typed in the browsers address bar for example.
Regards,
Gunnar
Gunnar Brinkmann, modified 5 Years ago. Junior Member Posts: 54 Join Date: 12/2/11 Recent Posts
The solution was:

1.) use the page url containing the target portlet for the javascript popup window call, for example
1.a.) /web/mysite/mypage (public site)
1.b.) /group/mysite/mypage (access restricted site)
2.) use the parameters
2.a.) p_p_id=portletId
2.b. ) p_p_lifecycle=0
2.c.) p_p_state=exclusive
2.d.) p_p_mode=view

Don't forget to look at the target page's html code.

if the portlet is instanceable. An instanceable porletId looks like portletId_INSTANCE_randomstring.

The page may be hidden from navigation (if you for example like in my case want to embed a portlet in your site only for this popup usage purpose).