留言板

Running the portlet through theme

l ll,修改在8 年前。

Running the portlet through theme

Regular Member 帖子: 158 加入日期: 11-12-12 最近的帖子
Hi!
How to run a portlet through theme js? I know about the $theme.runtime. But I would like to click event


A.one('#feedback').on("click", function (e) {
			......
		});
thumbnail
Himanshu Bhandari,修改在8 年前。

RE: Running the portlet through theme

Regular Member 帖子: 148 加入日期: 14-5-9 最近的帖子
Hi
How to run a portlet through theme js?

What do you mean by run? Is it animation like moving portlet from one location to another, Or to start execution of a portlet?
I guess you ca play with CSS, and put portlet in a div that is hidden, but on click get displayed kind of things...
Thanks.
thumbnail
David H Nebinger,修改在8 年前。

RE: Running the portlet through theme

Liferay Legend 帖子: 14919 加入日期: 06-9-2 最近的帖子
Himanshu is a little off base here.

You use $theme.runtime() to get your portlet on the page.

Binding handlers to elements, well just add javascript so that after page load you look for the element and, when found, bind your event handler.
thumbnail
Julien Mourad,修改在8 年前。

RE: Running the portlet through theme

Junior Member 帖子: 78 加入日期: 15-1-22 最近的帖子
You can use the Liferay JS Object* to add portlets to your page using Liferay.Portlet.add

*https://www.liferay.com/web/pankaj.kathiriya/blog/-/blogs/usage-of-liferay-js-object

You may also want to have a look at this thread:
https://www.liferay.com/community/forums/-/message_boards/message/4441832