Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
embed a portlet via js
#set ($articleService = $portal.getClass().forName('com.liferay.portlet.journal.service.JournalArticleLocalServiceUtil'))
#set ($article = $articleService.getArticle($getterUtil.getLong($groupId), $reserved-article-id.data))
$le-content.data
<div id="${request.portlet-namespace}discussion">
<script type="text/javascript">
AUI().use('liferay-portlet-url', 'aui-resize-iframe', function(A) {
var portletURL = Liferay.PortletURL.createRenderURL();
portletURL.setPortletId('1_WAR_mypluginportlet');
portletURL.setPlid(themeDisplay.getPlid())
portletURL.setResourceId('/my.jsp');
portletURL.setParameter('param1', value1);
var html = '<iframe frameborder="0" id="${request.portlet-namespace}discussion_frame" src="' + portletURL.toString() + '" scrolling="no" width="100%"></iframe>';
A.one('#${request.portlet-namespace}discussion').append(html);
A.one('#${request.portlet-namespace}discussion_frame').plug(A.Plugin.ResizeIframe);
});
</script>
<div id="${request.portlet-namespace}discussion"></div>
<script type="text/javascript">
AUI().use('liferay-portlet-url', 'aui-resize-iframe', function(A) {
var portletURL = Liferay.PortletURL.createResourceURL();
portletURL.setPortletId('discussionwidget_WAR_discussionwidgetportlet');
portletURL.setWindowState('pop_up');
portletURL.setParameter('className', 'com.liferay.portlet.journal.model.JournalArticle');
portletURL.setParameter('classPK', '${article.getResourcePrimKey()}');
portletURL.setParameter('subject', '${htmlUtil.escape($reserved-article-title.data)}');
var html = '<iframe frameborder="0" id="${request.portlet-namespace}discussion_frame" src="' + portletURL.toString() + '" scrolling="no" width="100%"></iframe>';
A.one('#${request.portlet-namespace}discussion').append(html);
A.one('#${request.portlet-namespace}discussion_frame').plug(A.Plugin.ResizeIframe);
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.