简体   繁体   中英

How to remove widget's title in Liferay's custom theme

I created a custom theme for Liferay 7.2 through IDE. When I try to modify "Look and feel" setting of any widget, I'm unable to remove the title or to see the option's dropdown of "Application Decorators".

I followed this tutorial and created the "liferay-look-and-feel.xml". With this file the option's dropdown is now visible, but I still cannot remove any title. Even selecting "Barebone" option and "No" in "Use Custom Title".

I printed the portlet preferences, and the "portletSetupUseCustomTitle" property is set to false

Probably, I have a missing configuration on my Theme's settings but I'm not aware about which one is.

In your custom theme find  portlet.ftl file Add this line where title are shown
   <#if portlet_display.getPortletDecoratorId() != "barebone">
            <div class="autofit-col autofit-col-expand">
            <h2 class="portlet-title-text">${portlet_title}</h2>
            </div>
  </#if>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM