Asset Publisher widget shows author and modified date by default from Liferay DXP 7.2 onwards
How To articles are not official guidelines or officially
supporteddocumentation. They are community-contributed content and may
not alwaysreflect the latest updates to Liferay DXP. We welcome your
feedback toimprove How to articles!
While we make every effort to ensure this Knowledge Base is accurate,
itmay not always reflect the most recent updates or official
guidelines.We appreciate your understanding and encourage you to reach
out with anyfeedback or concerns.
Legacy Article
You are viewing an article from our legacy
"FastTrack"publication program, made available for
informational purposes. Articlesin this program were published without a
requirement for independentediting or verification and are provided
"as is" withoutguarantee.
Before using any information from this article, independently verify
itssuitability for your situation and project.
Issue
- Dragging and dropping an Asset Publisher widget on a page will show, by default, the author and the modified date for all of its contents contrarily to other previous versions.
Resolution
- There is no way to change these default settings via UI.
- A feature request to let users configure any of the Asset Publisher's default values has been created and it is currently under study by Product Management. This feature may get included in an upcoming Liferay version depending on PM's final decision.
- However, there would be some possible workarounds:
- For Widget Pages only, a Configuration Template could be created configured to not show either the author or the modified date:
- Add an Asset Publisher widget to a page.
- Modify its configuration to show neither the author nor the modified date.
- Click in the three-dots menu and select "Configuration Templates".
- Click in "Save current configuration as Template" providing a name.
- Remove the Asset Publisher widget.
- Click in the plus button in order to drag and drop a new Asset Publisher widget based off of the Configuration Template previously created.
- Custom development (fragment module + .config file):
- A combination of a fragment module and a .config file would make the Asset Publisher widget not show these fields by default.
- A sample fragment module for DXP 7.2 with the corresponding .config file have been attached to this article as a starting point, but neither constituting an official solution nor coming with any kind of support.
- The deployment sequence for these elements would be: first, the fragment module until it is fully loaded, and then the .config file in the folder <LIFERAY_HOME>/osgi/configs. Doing it in a different order might cause transitory errors.
Did this article resolve your issue ?