【问题标题】:How to extend ftl display template in alfresco share?如何在露天共享中扩展 ftl 显示模板?
【发布时间】:2013-11-07 00:23:22
【问题描述】:

我有以下 xml 自定义来部署我声明的自定义:

<module>
    <id>Global changes</id>
    <auto-deploy>true</auto-deploy>

    <!-- Enhance individual WebScripts when their paths match -->
    <customizations>
        <customization>
            <targetPackageRoot>org.alfresco</targetPackageRoot>
            <sourcePackageRoot>fr.mypackage</sourcePackageRoot>
        </customization>

    </customizations>
</module>

我正在尝试向 header.get.html.ftl 添加一个额外的 CSS,所以我在以下路径下创建了 webscripts/fr/mypackage/components/header/ 并添加了一个 header.get.html.ftl以下内容:

<@markup id="css-additional" target="css" action="after" scope="global">
    <@link href="${url.context}/res/themes/${theme}/css/global-header.css" group="header"/>
</@>

但是 css 没有添加到标题中。我在这里错过了重要的一步吗?
编辑:如果这有帮助,我应该补充说我正在开发 4.2.e。

【问题讨论】:

  • 尝试将其添加到主 ftl 而不是标头 ftl,因为 alfresco 可能正在删除头文件使用情况。
  • 我的意思是说文件本身就是header组件的主文件。我没有覆盖已弃用的 header.get.head.ftl,而是覆盖了 header.get.html.ftl。哪个是主模板本身

标签: alfresco alfresco-share


【解决方案1】:

我认为他们在 4.2 中更改了它,看看 http://blogs.alfresco.com/wp/developer/2013/09/04/customizing-the-share-header-menu-part-1/

这里的源码包应该是:&lt;targetPackageRoot&gt;org.alfresco.share.header&lt;/targetPackageRoot&gt;

【讨论】:

  • 所以不能针对组件包和镜像目录结构?我希望能够做到这一点,因为我有几个要覆盖的组件以及不在组件下的东西。谢谢你的回复
猜你喜欢
  • 1970-01-01
  • 2020-02-20
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多