You can create a JSP hook to configure Publisher Asset.
The original configuration is displayed / html / portlet / asset _publisher / configuration.portal.jsp.
You can include the original jsp in your hook, and then add your own settings.
Example:
<%-- Include the original Asset Publisher configuration JSP. --%> <%@include file="/html/portlet/asset_publisher/configuration.portal.jsp"%> <%-- Read current value from portlet preferences. --%> <% String abstractLength = portletPreferences.getValue("abstractLength", "100"); %> <%-- Hidden div with custom input fields. --%> <div id="customPreferences" style="display: none;"> <aui:fieldset label="fieldset.abstractLength"> <aui:input name="abstractLength" label="abstractLength" value="<%= abstractLength %>"> <aui:validator name="number"/> <aui:validator name="min">1</aui:validator> </aui:input> </aui:fieldset> </div> <%-- JS code to place custom preferences at the end of Display Settings tab. --%> <%-- It uses jQuery, but it not a requirement. --%> <script> $(document).ready(function () { </script>
This is a good approach to extend the original JSP - i.e. turn on the original, and then perform the setting. Thus, there are good chances for a painless upgrade to future versions of Liferay.
For general guidelines for implementing JSP interceptors, see the Lideray Developer Guide .
source share