首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何在Liferay 6.1的“我的帐户”中隐藏“用户信息”选项?

问如何在Liferay 6.1的“我的帐户”中隐藏“用户信息”选项?
EN

Stack Overflow用户
提问于 2013-02-01 17:53:38
回答 3查看 2.4K关注 0票数 1

我试图通过使用钩子来隐藏“用户信息”中的一些选项。我只想用CSS (style="display:none")隐藏它。用户信息显示在我的帐户页面的右侧。我想知道,我应该在哪个页面进行更改?在创建钩子时,我应该选择哪个页面来隐藏那些链接,比如“组织,站点等”。请帮帮我。

EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2013-02-02 13:27:58

无法使用CSS删除这些选项。我们可以执行以下简单的java代码来删除这些选项卡...我们需要编辑的页面是"/portal-trunk/portal-web/docroot/html/portlet/users_admin/edit_user.jsp".

代码语言:javascript
复制
List<String> identificationList = new ArrayList<String>();

for(String identificationItem : identificationSections){
    identificationList.add(identificationItem);
     System.out.println(identificationItem);
}
identificationList.remove("websites");
identificationList.remove("instant-messenger");
identificationList.remove("social-network");
identificationList.remove("sms");
identificationList.remove("open-id");

identificationSections = new String[identificationList.size()];
for(int i = 0; i < identificationList.size(); i++){
    identificationSections[i] =identificationList.get(i);
}

使用上面编写的简单java代码可以很容易地隐藏这些链接。

票数 1
EN

Stack Overflow用户

发布于 2015-04-14 22:07:22

您必须通过将它们写入portal-ext.properties中来选择所需的选项卡,如下所示:

代码语言:javascript
复制
    #
# Input a list of sections that will be included as part of the user form
# when updating a user in the My Account portlet.

users.form.my.account.main=details,password,organizations,sites,user-groups,roles,personal-site,categorization
users.form.my.account.identification=addresses,phone-numbers,additional-email-addresses,websites,instant-messenger,social-network,sms,open-id
users.form.my.account.miscellaneous=announcements,display-settings,comments,custom-fields

每个字段都将链接到其jsp。例如,"details“将显示details.jsp。

票数 4
EN

Stack Overflow用户

发布于 2013-02-01 20:21:00

由于您的问题是查找jsp文件,因此您应该执行以下操作:

  1. 下载Liferay源代码,并通过门户网站将门户主干作为Liferay项目添加到您想要的文件(管理我的帐户)中,然后从您的浏览器
  2. 中获取url,在usl中搜索"struts_action“属性。对于本例,它是"/my_sites/view“,这非常有用,因为第一个参数指示控制jsp页面的portlet。第二个参数通常是您要搜索的jsp,在
  3. 主干中找到该文件,然后搜索您想要编辑的

组件。它可能在页面本身中,也可能在包含的页面或兄弟页面(以选项卡形式提供)中

对于您的情况,它是"/portal-trunk/portal-web/docroot/html/portlet/users_admin/edit_user.jsp“

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/14643607

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档