Liferay 7.0-通过主题使所有portlet默认无边界

Liferay 7.0-通过主题使所有portlet默认无边界,liferay,portlet,liferay-theme,liferay-7,Liferay,Portlet,Liferay Theme,Liferay 7,在寻找通过主题设置portlet默认外观问题的解决方案后,我在WEB-INF/liferay look and feel.xml中尝试了以下内容: <setting configurable="true" key="portlet-setup-show-borders-default" type="checkbox" value="false" /> 然而,它在Liferay 7.0 GA3上似乎不起作用,并且已经没有地方寻

在寻找通过主题设置portlet默认外观问题的解决方案后,我在
WEB-INF/liferay look and feel.xml
中尝试了以下内容:

<setting configurable="true"
         key="portlet-setup-show-borders-default"
         type="checkbox"
         value="false"
/>

然而,它在Liferay 7.0 GA3上似乎不起作用,并且已经没有地方寻找解决方案了

我的要求是一个默认的portlet行为,其中所有的衰减都被禁用,即边框和标题以及其他任何内容


值得一提的是,我正在使用新的主题生成器/Gulp构建管道。非常感谢任何指针。

以及问题中提到的设置,请在portlet.ftl的底部进行注释或删除,如下所示:

<div class="${portlet_content_css_class}">
<#--<#if portlet_display.isShowBackIcon()>-->
    <#--<a class="icon-monospaced portlet-icon-back text-default" href="${portlet_back_url}" title="<@liferay.language key="return-to-full-page" />">-->
        <#--<@liferay_ui["icon"]-->
                <#--icon="angle-left"-->
        <#--markupView="lexicon"-->
            <#--/>-->
    <#--</a>-->
<#--</#if>-->

    <#--<h2 class="portlet-title-text">${portlet_title}</h2>-->

${portlet_display.writeContent(writer)}
</div>

-->
${portlet_display.writeContent(writer)}

这将删除所有portlet标题,这样您就不能在使用此主题的站点上拥有标题portlet,这正是我想要的。

此方法存在一个小概念问题:WEB-INF/liferay-look-and-feel.xml上的设置条目仅用于为您提供一个配置选项,不管您实际如何实现其行为。您建议的解决方案可以工作,但这不是由于设置条目造成的-您的模板似乎没有使用设置条目,请尝试通过UI在主题配置中切换它

无需更改模板,避免UI中隐藏的功能,就可以使用装饰器。喜欢

<portlet-decorator id="borderless" name="Borderless">
    <default-portlet-decorator>true</default-portlet-decorator>
    <portlet-decorator-css-class>portlet-borderless</portlet-decorator-css-class>
</portlet-decorator>

该类将应用于所有Portlet,因为它在xml文件中被标记为默认值。

如果其他人偶然发现这个问题,该功能已被Liferay 7中的Portlet Decorators替换。有关这方面的更多信息,请参阅文档:

.portlet-borderless {

    .portlet-content-editable {
        border-style: none;
    }

    .portlet-content {
        background: rgba(255,255,255,.90);
    }
}