如何自定义要在“添加更多portlet"中显示的portlet.菜单 [英] How to customize which portlets to show in "Add more portlets" menu

查看:95
本文介绍了如何自定义要在“添加更多portlet"中显示的portlet.菜单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要自定义哪个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:

  1. 让用户成为您希望他们向其中添加portlet的组织或站点的一部分.
  2. 转到Control Panel-> Roles并担任常规角色(而不是组织或站点角色)
  3. 在定义权限"下拉菜单中,转到Portal-> Site-> Page->并选中Update作为已定义的权限.
  4. 再次转到定义权限"下拉菜单,然后转到Site Application->(选择要用户添加到页面的Portlet名称)-> Add to page.
  5. 如果需要用户添加其他portlet,请在必要时重复步骤4.
  6. 将此角色添加到您的用户:转到Control Panel-> User and Organizations.单击您的User并转到Roles.
  7. 最后,您需要转到Server Administration并执行Clean Up Permissions以清除对GuestPower Users角色的权限.
  1. Have the user be part of the organization or site that you want them to add portlets to.
  2. Go to Control Panel -> Rolesand make a Regular Role (not an Organization or Site role)
  3. In Define Permissions drop-down menu go to Portal -> Site -> Page -> and check Update as a defined permission.
  4. 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.
  5. Repeat Step-4, if necessary if there are other portlets you want the users to add.
  6. Add this role to your user: Go to Control Panel -> User and Organizations. Click on your User and go to Roles.
  7. Finally you need to go to Server Administration and execute the Clean Up Permissions to clear permissions for the Guest and Power 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆