留言板

how to put a instanceable portlet in the control panel

Sundeep sde,修改在12 年前。

how to put a instanceable portlet in the control panel

New Member 帖子: 9 加入日期: 10-10-11 最近的帖子
Hi,

I tried to put a instanceable portlet in the control panel, but it doesn't work. I even removed the check for the instanceable portlets inside the control panel page using a hook, but it does not help. Is their anything else I need to change to get it working?

Any help would be appreciated.

Thank you,
Sundeep.
thumbnail
Olaf Kock,修改在12 年前。

RE: how to put a instanceable portlet in the control panel

Liferay Legend 帖子: 6403 加入日期: 08-9-23 最近的帖子
If the portlet is instanceable: Do you need more information for the instance? E.g. can you configure it (or do you need to configure it?)

If not - why do you need it to be instanceable.

If yes - how do you want to provide the required information to the control-panel portlet?
thumbnail
Jignesh Vachhani,修改在12 年前。

RE: how to put a instanceable portlet in the control panel

Liferay Master 帖子: 803 加入日期: 08-3-10 最近的帖子
Yes Eaxctly
If you need portlet in control panel then why you should make it instanciable.
so ideally you can not add instnaciable portlet in control panel.
OR else you can put this portlet in any community private page and can use for configuration.
thumbnail
Victor Zorin,修改在12 年前。

RE: how to put a instanceable portlet in the control panel

Liferay Legend 帖子: 1228 加入日期: 08-4-14 最近的帖子
This is what you can do if portlet has to be multi-deployable to normal pages and also be present on ControlPanel.

If this is your custom portlet, extend your portlet.xml liferay-portlet.xml and liferay-display.xml by making a cut-and-paste details of your current portlet into the same (corresponding) file.
Then, change <portlet-name> to another name, and make <instanceable>=false.
What you effectively do, is making a declaration of another portlet which behaves exactly like your original portlet but which is for deployment within ControlPanel. You do not have to do any coding, any following changes within your portlet will be propagated to ControlPanel portlet.
Eg.:

<liferay-portlet-app>
<portlet>
<!-- your original portlet to be deployed normally to user pages -->
<portlet-name>MYPORTLET_10</portlet-name>
...
<instanceable>true</instanceable>
</portlet>
<portlet>
<!-- your new portlet to be deployed to control panel -->
<portlet-name>MYPORTLET_10_CP</portlet-name>
...
<instanceable>false</instanceable>
</portlet>
...
thumbnail
David García González,修改在12 年前。

RE: how to put a instanceable portlet in the control panel

Regular Member 帖子: 127 加入日期: 09-7-14 最近的帖子
And is it possible the opposite scenario?

I wanted to put a non instanceable portlet (password policies) in a page of an organization, is it possible?

Thanks!
thumbnail
Julien Bonjean,修改在12 年前。

RE: how to put a instanceable portlet in the control panel

Junior Member 帖子: 57 加入日期: 09-6-10 最近的帖子
David García González:
And is it possible the opposite scenario?

I wanted to put a non instanceable portlet (password policies) in a page of an organization, is it possible?

Thanks!


Yes it is possible, afaik, the only restriction about non-instanceable portlets is that you can put only 1 instance per page.
thumbnail
David García González,修改在12 年前。

RE: how to put a instanceable portlet in the control panel

Regular Member 帖子: 127 加入日期: 09-7-14 最近的帖子
Thanks, I wanted to put a non-instanceable portlet that are shown in the Control Panel on a page. It was a bit difficult because the Control panel portlets are in the "hidden" category and you can't select them, so I had to change the category for this portlet.