LRP-614 practice question 13 of 25
The recommended way to turn off portlet borders in a custom theme is to:
Full set: 144 questionsThe 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.
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. ---
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.
Keep practicing
Take the free LRP-614 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other LRP-614 practice questions
- Question 1The best way to add a new language key to the portal is through:
- Question 2In a JSP that includes the tag, the method to check permissions is:
- Question 3A hook plugin can be used to: (Please select all correct answers.)
- Question 4An administrator would like to add a new travel preferences section in the Miscellaneous …
- Question 5The following statements about plugins are true: (Please select all correct answers.)
- Question 6All Service Builder entities contain a local reference to: (Please select all correct ans…
