0

我想自定义 Alfresco aikau 页脚。一开始我想在 AlfShareFooter 中注入自定义 html 模板。到目前为止,我创建了一个扩展:

<extension>
  <modules>
    <module>
      <id>MyCmpny widgets</id>
      <version>1.0</version>
      <auto-deploy>true</auto-deploy>
      <configurations>
        <config evaluator="string-compare" condition="WebFramework" replace="false">
          <web-framework>
            <dojo-pages>
              <packages>
                <package name="mycmpny" location="js/mycmpny"/>
              </packages>
            </dojo-pages>
          </web-framework>
        </config>
      </configurations>
    </module>
  </modules>
</extension>

页脚的 Html 模板,现在我正在尝试覆盖templateStringAlfShareFooter 对象:

define(["dojo/_base/declare",
        "alfresco/footer/AlfShareFooter'",
        "dojo/text!./templates/ep-footer.html"],
       function (declare, AlfShareFooter, template) {
         return declare([AlfShareFooter], {
           templateString: template
         })
       });

但它不起作用。我不熟悉 Dojo,我认为问题出在语法上......

4

1 回答 1

2

我发现了如何覆盖模板:

define(["dojo/_base/declare",
    "dojo/text!./templates/my-footer.html",
    "alfresco/footer/AlfShareFooter"],
    function (declare, template, AlfShareFooter) {
      return declare([AlfShareFooter],{
        postMixInProperties: function my_footer_AlfShareFooter__postMixInProperties(){
          this.inherited(arguments);
          this.templateString = template;
        }
      });
    });

但是随着 g̶r̶e̶a̶t̶ 自定义页脚模板附带了 g̶r̶e̶a̶t̶ 自定义 css 和 i18n... 所以我写了一篇关于在 Alfresco 中更改 Aikau 页脚的帖子。

于 2016-03-01T20:45:53.720 回答