How to embed a portlet in an in-page popup in Liferay 7 -
this question has answer here:
- display portlet in pop-up liferay 1 answer
from javascript, need create in-page (div-based?) popup shows particular portlet.
this looks need:
https://web.liferay.com/community/wiki/-/wiki/main/using+pop-up+in+liferay
liferay provides class called expanse.popup implement type of pop ups. here how type of pop like:
javascript code make asynchronous call url give , place content in our page. below there example load url 'url' in pop called 'our title':var popup = new expanse.popup(
[...]
problem: unfortunately, when put code in portlet , deploy&run it, get:
typeerror: expanse.popup not function
according comments @ page, function has changed names many times. have tried alloy.popup
, a.popup
, liferay.popup
, fail in similar way. also, have read aui deprecated , not recommended new development.
liferay.util.openwindow
works unfortunately takes url parameter, rather portlet. there way make show portlet? don't want create page on sites.
question: how implement in-page popup loads portlet, in liferay 7?
it can modal or not: don't mind if users can let popup open , interact rest of page.
the openwindow approach. if @ portlet options , how configuration dialogue gets opened this
liferay.portlet.openwindow({ bodycssclass: 'dialog-with-footer', destroyonhide: true, namespace: '_com_liferay_polls_web_portlet_pollsdisplayportlet_instance_qop6anrnoy5o_', portlet: '#p_p_id_com_liferay_polls_web_portlet_pollsdisplayportlet_instance_qop6anrnoy5o_', portletid: 'com_liferay_polls_web_portlet_pollsdisplayportlet_instance_qop6anrnoy5o', title: 'asdf', uri: 'portlet render url'
});
the url required pinpoint portlet render can generate 1 liferay-portlet:renderurl tag(it takes portlet id parameter) or can construct if self if know syntax(not recommended)
Comments
Post a Comment