Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: Plain Popup URL
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
- are these parameters sufficient or should we add for example p_p_lifecycle, p_p_mode and/or others?
Regards,
Gunnar
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
Hi ,You can use below code for forming url
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/
[code]<portlet:renderurl var="popupUrl" windowstate="<%=LiferayWindowState.POP_UP.toString() %>">
<portlet:param name="mvcPath" value="/test.jsp" />
</portlet:renderurl>
refer below urls for pop uphttps://www.liferaystack.com/2017/09/aui-popup-and-aui-modal-dialog-in-liferay-7.html
http://www.javasavvy.com/lifeay-aui-popup-sample-code/
Thank you, but as I wrote, we want to open the popup via plain URL, not via another portlet.
Regards,
Gunnar
Regards,
Gunnar
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>
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
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
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).
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).
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™