掲示板

Liferay 6.1: How to customize which portlets to show in "Add more portlets"

thumbnail
11年前 に Prakash Khanchandani によって更新されました。

Liferay 6.1: How to customize which portlets to show in "Add more portlets"

Expert 投稿: 329 参加年月日: 11/02/10 最新の投稿
I need to customize as to which portlets appear in the "Add more portlet menu" as shown in the image below.

I need to restrict the number of portlets displayed in this menu based on the logged-in user or site community. So that Community owner or admin will be able to add only those portlets to their pages which the omni-admin decides for them.

Does Liferay provide any such functionality (through configuration or something) or do I have to create a new portlet and a hook to achieve this?

Any idea would be very much appreciated.

Thank You

添付ファイル:

thumbnail
11年前 に Paul . によって更新されました。

RE: Liferay 6.1: How to customize which portlets to show in "Add more portl

Liferay Master 投稿: 522 参加年月日: 11/08/29 最新の投稿
You should be able to achieve this by defining permissions in control panel.
Create / edit a specific role then define permissions for that role. There should be an action for Add to page on these specific portlets.
thumbnail
11年前 に Prakash Khanchandani によって更新されました。

RE: Liferay 6.1: How to customize which portlets to show in "Add more portl

Expert 投稿: 329 参加年月日: 11/02/10 最新の投稿
I am not able to achieve this through the ADD_TO_PAGE permissions you mentioned, I guess this is because of this issue
11年前 に Chintan Akhani によって更新されました。

RE: Liferay 6.1: How to customize which portlets to show in "Add more portl

Regular Member 投稿: 111 参加年月日: 08/03/13 最新の投稿
Hi Prakash,

By changing the category type you can achieve this, for this change you need to modify liferay-display.xml file, if you want to do it for liferay existing portlet than you can achieve it through ext plugin.

Change the category name to "category.hidden". In this case only omniAdmin (portal admin) will be able to access these portlets in control panel.

Hope this helps.
Thanks,
Chintan
thumbnail
11年前 に Paul . によって更新されました。

RE: Liferay 6.1: How to customize which portlets to show in "Add more portl

Liferay Master 投稿: 522 参加年月日: 11/08/29 最新の投稿
Prakash ,
It's been a while since I accessed the form, from the issue you indicated I see http://issues.liferay.com/browse/LPS-24695?focusedCommentId=167067&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-167067

may be you can give it a try as commented.
thumbnail
11年前 に Dhrutika Parekh によって更新されました。

RE: Liferay 6.1: How to customize which portlets to show in "Add more portl

Expert 投稿: 435 参加年月日: 09/02/09 最新の投稿
Hi Pratap,

Portlets other than defined in below property and which is not having category as hidden will come under 'add more' menu.
dockbar.add.portlets=56,101,110,71

To have site based add application menu,you need to do code customization in layout_configuration > view_category.jsp

Regards,
Dhrutika
11年前 に Chintan Akhani によって更新されました。

RE: Liferay 6.1: How to customize which portlets to show in "Add more portl

Regular Member 投稿: 111 参加年月日: 08/03/13 最新の投稿
I believe dockbar.add.portlets contains list of portlet ids which will be displayed directly in Add Application option (not under Add More option)
thumbnail
11年前 に Prakash Khanchandani によって更新されました。

RE: Liferay 6.1: How to customize which portlets to show in "Add more portl

Expert 投稿: 329 参加年月日: 11/02/10 最新の投稿
Thanks Dhrutika and Chintan.

But the suggestions does not help with customizing the Add Menu.

And yes Chintan you are absolutely right about the property: dockbar.add.portlets
11年前 に Chintan Akhani によって更新されました。

RE: Liferay 6.1: How to customize which portlets to show in "Add more portl

Regular Member 投稿: 111 参加年月日: 08/03/13 最新の投稿
Hi Prakash,

You can achieve this by modifying view.jsp of "dockbar" portlet, and as it's an out of the box portlet, you have to create a hook. Please let me know if it works.
11年前 に Chintan Akhani によって更新されました。

RE: Liferay 6.1: How to customize which portlets to show in "Add more portl

Regular Member 投稿: 111 参加年月日: 08/03/13 最新の投稿
Hi Prakash,

if you want to change list of portlets which are displayed along with More option than you need to modify dockbar portlet's view.jsp.

But if you want to manage portlets which are displayed in a "more applications" popup, based on permission than "layout_configuration" portlet's view.jsp needs to be modifed so in this case you need to create a hook for layout_configuration.
thumbnail
11年前 に Prakash Khanchandani によって更新されました。

RE: Liferay 6.1: How to customize which portlets to show in "Add more portl

Expert 投稿: 329 参加年月日: 11/02/10 最新の投稿
Thanks, will try to work on this.
thumbnail
11年前 に Daniel Kiyotomo Ozeki によって更新されました。

RE: Liferay 6.1: How to customize which portlets to show in "Add more portl (回答)

New Member 投稿: 15 参加年月日: 12/03/02 最新の投稿
hi Prakash,

I don't know if you have solved this issue but you can limit what portlets can be added to the page from the administration side and not have to do it through development. You will need to create a role however and add everyone on it. Here were my steps in achieving this:

1) Have the user be part of the organization or site that you want them to add portlets to.
2) Go to "Roles" in control panel and make a regular role (not organization or site role)
2) In define permissions drop down menu go to Portal -> Site -> Page -> and check Update as a defined permission
3) Go to define permissions drop down menu again and go to Site Application ->(Portlet Name that you want your user to only add) -> Add to page
4) Repeat Step 3if necessary if there are other portlets you want them to add
5) Add this role to your user: Go to User and Organizations. Click on your User and go to "Roles"
6)Finally you need to go to Server Administration and execute the "Clean Up Permissions" as indicated in the ticket you posted.

This should now make it so that whatever user is attached to this role they will see an "Add" button on the left hand corner and will only be able to add portlets you specify in the role permissions.

Let me know if that helps
thumbnail
11年前 に Prakash Khanchandani によって更新されました。

RE: Liferay 6.1: How to customize which portlets to show in "Add more portl

Expert 投稿: 329 参加年月日: 11/02/10 最新の投稿
Thanks Daniel Kiyotomo Ozeki for your answer, will check and let you know. I have also posted your answer here.

Thanks, it worked.
thumbnail
9年前 に Nagendra Kumar Busam によって更新されました。

RE: Liferay 6.1: How to customize which portlets to show in "Add more portl

Liferay Master 投稿: 678 参加年月日: 09/07/07 最新の投稿
I have similar requirement (not exactly same though) - I was able to configure portlets for my custom role as per steps mentioned able, I am seeing portlets perfectly fine if I login with user having that role.

I don't want user with my custom role to see Edit Page in 6.2 (themes, layouts & other sections under ). Can somebody point out whether this can be done with permissions

Mapping to Edit Page in 6.2 to 6.1 is Manage (my custom role in 6.1 seeing Page, Page Layout,Page Customizations) at dock bar level.

Any pointers are much welcome
thumbnail
9年前 に David H Nebinger によって更新されました。

RE: Liferay 6.1: How to customize which portlets to show in "Add more portl

Liferay Legend 投稿: 14919 参加年月日: 06/09/02 最新の投稿
Please don't revive a dead thread, post a new one instead.
thumbnail
9年前 に Nagendra Kumar Busam によって更新されました。

RE: Liferay 6.1: How to customize which portlets to show in "Add more portl

Liferay Master 投稿: 678 参加年月日: 09/07/07 最新の投稿