如何自定义要在“添加更多portlet"中显示的portlet.菜单 [英] How to customize which portlets to show in "Add more portlets" menu
问题描述
我需要自定义哪个portlet出现在添加更多portlet菜单"中,如下图所示:
I need to customize as to which portlet appear in the "Add more portlet menu" as shown in the image below:
我需要根据登录的用户或站点(社区)来限制此菜单中显示的portlet的数量.这样,站点所有者或站点管理员将只能将这些portlet添加到omni管理员为他们决定的页面中.
I need to restrict the number of portlets displayed in this menu based on the logged-in user or site (community). So that Site-owner or Site-admin will be able to add only those portlets to their pages which the omni-admin decides for them.
Liferay是否提供任何此类功能(通过配置或其他方式),或者我必须创建一个新的portlet和一个钩子才能实现此目的?
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?
环境:Liferay 6.1 CE GA2
Environment: Liferay 6.1 CE GA2
任何想法都会非常感激.
Any idea would be very much appreciated.
谢谢
推荐答案
以下是您可以从管理端限制可以向页面添加哪些portlet,而不必进行任何开发.
You can limit what portlets can be added to the page from the Administration side and don't have to do any development.
但是,您将需要创建一个角色并在其中添加所有人.以下是实现此目的的步骤:
You will need to create a role however and add everyone on it. Here are the steps for achieving this:
- 让用户成为您希望他们向其中添加portlet的组织或站点的一部分.
- 转到
Control Panel
->Roles
并担任常规角色(而不是组织或站点角色) - 在定义权限"下拉菜单中,转到
Portal
->Site
->Page
->并选中Update
作为已定义的权限. - 再次转到定义权限"下拉菜单,然后转到
Site Application
->(选择要用户添加到页面的Portlet名称)->Add to page
. - 如果需要用户添加其他portlet,请在必要时重复步骤4.
- 将此角色添加到您的用户:转到
Control Panel
->User and Organizations
.单击您的User
并转到Roles
. - 最后,您需要转到
Server Administration
并执行Clean Up Permissions
以清除对Guest
和Power Users
角色的权限.
- Have the user be part of the organization or site that you want them to add portlets to.
- Go to
Control Panel
->Roles
and make a Regular Role (not an Organization or Site role) - In Define Permissions drop-down menu go to
Portal
->Site
->Page
-> and checkUpdate
as a defined permission. - Go to Define-permissions drop-down menu again and go to
Site Application
-> (choose Portlet Name that you want your user add to the page) ->Add to page
. - Repeat Step-4, if necessary if there are other portlets you want the users to add.
- Add this role to your user: Go to
Control Panel
->User and Organizations
. Click on yourUser
and go toRoles
. - Finally you need to go to
Server Administration
and execute theClean Up Permissions
to clear permissions for theGuest
andPower Users
roles.
现在应该做到这一点,以便无论与该角色相关联的用户如何,他们都将在左上角看到一个添加"按钮,并且只能添加您在角色权限中指定的portlet.
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.
这篇关于如何自定义要在“添加更多portlet"中显示的portlet.菜单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!