Issue
- Is there an OOTB feature to hide the following fields in the Document and Media Upload section?
- Document Type
- Display Page
- Categorization
- Expiration Date
- Friendly URL
- Related Assets
- Permissions
Environment
- Liferay DXP 7.4
Resolution
- No, there is no OOTB feature available to hide these fields from the Document and Media Upload section.
NOTE: The following resolution requires customization and should only be implemented at the discretion of your team. Liferay Support will not be able to assist with designing or implementing customizations.
- However, if hiding these fields is still required, kindly override the following JSP file to achieve this functionality. Below are the steps to do so:
-
Steps:
- Start Liferay Developer Studio (LDS).
-
Create a Liferay Workspace:
- Navigate to
File > New > Liferay Workspace Project
. - Add the following line in
gradle.properties
, specifying your Liferay home path:iferay.workspace.home.dir=home/me/Liferay-7.4-U90/Liferay_Home
- Navigate to
-
Add the Liferay Server:
- In LDS, locate the Server tab at the bottom left.
- Click on the link that says "No Servers are available. Click this link to create a new server...".
- Select
Liferay, Inc. > Liferay 7.x
, click Next, and in the "Liferay Portal Bundle Directory" field, specify your Liferay home path. - Click Finish to complete the setup.
-
Create a Module Project Fragment:
- Navigate to
File > New > Liferay Module Project Fragment
. - Enter a name for your project under "Project Name:" and click "Next".
- Select
com.liferay.document.library.web.jar
in "Host OSGi bundle". - Select
edit_file_entry.jsp
in "Overridden files". - Click Finish.
- Navigate to
-
Customize the JSP File:
- Navigate to the following location in your "module" project:
src/main/resources > META-INF > resources > document_library > edit_file_entry.jsp
. - Add a
<div>
tag with thestyle
attribute set todisplay:none
, wrapping the code for the fields you want to hide:<div style="display:none"> <!-- Code for the fields such as Document Type, Display Page, Categorization, etc. --> </div>
- Navigate to the following location in your "module" project:
-
Build and Deploy the Module:
- Locate the Gradle Tasks tab in LDS.
- Expand your Liferay workspace project, then go to
Modules > [Your Fragment Project] > Build
. - Run the
clean
task first, followed by thedeploy
task. - Once deployed, the specified fields will be hidden as expected.
-
Steps:
Additional Information
-
-
-
The steps above are provided as a reference. Customization should be done according to specific business requirements.
-
A sample plugin is attached for reference.
-
For further concerns or queries, it is recommended to connect with the Global Services Team, as they provide development insights and address business-specific requirements. This team can be contacted through a sales representative.
-
-