liferayfreemarkerliferay-7liferay-theme

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.


Solution

  • 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>