LRP-614 practice question 13 of 25

The recommended way to turn off portlet borders in a custom theme is to:

Full set: 144 questions
Answer options
A: Modify portlet.vm to hide the portlet borders Correct answer
B: Set the theme setting "portlet-setup-show-borders" to "false"
C: Create a JSP hook that overrides port!et_wrapper.jsp to hide the portlet borders
D: Set the portal property "portlet.setup.show.borders" tofalse"
Correct Answer:
A. Modify portlet.vm to hide the portlet borders
Explanation

The recommended and most effective way to permanently remove portlet borders within a specific custom theme is to modify the portlet.vm Velocity template. By creating a copy of portlet.vm from a parent theme (e.g., styled or unstyled) and placing it in the custom theme's docroot/templates/ directory, you can directly edit the markup. Removing the HTML elements and CSS classes responsible for rendering the border provides complete, theme-specific control and ensures the borders are always off when the theme is applied, regardless of portal or page settings.

Why Incorrect

B. Setting the theme setting "portlet-setup-show-borders" to "false" only hides the "Show Borders" checkbox from the page's "Look and Feel" configuration panel; it does not disable the borders themselves.
C. A JSP hook is a portal-wide customization mechanism. Using it for a theme-specific visual change is incorrect practice, as themes should be self-contained.
D. Setting a portal property in portal-ext.properties is a global change that affects the entire portal, not just a single custom theme as the question requires. ---

References

1. Liferay Portal 6.1 Developer's Guide: Chapter 10, "Themes and Layout Templates." The section on "Advanced Theming" describes the process of overriding default templates. It states, "To customize the look of every portlet on the page, you’d modify portlet.vm." This confirms that portlet.vm is the designated file for controlling the portlet chrome (which includes borders) at the theme level.

2. Liferay Portal 6.1 DTDs (liferay-look-and-feel610.dtd): This document defines the valid settings for a theme's liferay-look-and-feel.xml file. The description for the element indicates its purpose is to control the visibility of the configuration option for users, not to set the default state of the borders. The separate setting portlet-setup-show-borders-default controls the default value, but was not an option.

3. Official Liferay Source Code (v6.1): Examination of the html/themes/unstyled/templates/portlet.vm file shows the Velocity script and HTML markup that conditionally renders the portlet container and its borders based on the $portletdisplay.isShowPortletBorders() variable. Modifying this file is the direct implementation method for the theme.

Scroll to Top