Liferay: Remove 'Account Settings' fields

529 views Asked by At

I'm currently trying to remove fields from the Account Settings page and I am not sure how to properly approach this.

There's not really a proper way I can do this with CSS as it's a bit of a hacky way and it won't do the job properly as I can't access that page through CSS properly.

Also on this topic, when accessing the Account Settings page, my custom theme changes to the admin theme. Is there a reason this happens when accessing this page, even while signed in as a user?

1

There are 1 answers

0
Mohammed Yasin On

You can disable few fields based on properties/setting ,

Ex if you want to hide birthday fields then you can set this 

field.enable.com.liferay.portal.kernel.model.Contact.birthday=false same way  for gender also u can user

field.enable.com.liferay.portal.kernel.model.Contact.male=false,  but if  you want to hide  any  other field for which property/setting is not available you can actually do it either by theme or fragment module(hook).

To do from theme you may need to create a theme for control panel as, account setting resides in uses control panel theme  and then hide respected fields based on id

To do from fragment module you can refer below link

https://portal.liferay.dev/docs/7-1/tutorials/-/knowledge_base/t/jsp-overrides-using-osgi-fragments

Thanks