简体   繁体   English

如何在 Liferay 的自定义主题中删除小部件的标题

[英]How to remove widget's title in Liferay's custom theme

I created a custom theme for Liferay 7.2 through IDE.我通过 IDE 为 Liferay 7.2 创建了一个自定义主题。 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".我按照本教程创建了“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我打印了 portlet 首选项,并将“portletSetupUseCustomTitle”属性设置为 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>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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