2016-02-29 38 views
0

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

<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模板页脚,现在我试图重写AlfShareFooter对象的templateString

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

但它不工作。我不熟悉的道场,我认为这个问题是在语法...

回答

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; 
     } 
     }); 
    }); 

不重大但按自定义页脚模板意味着巨大的自定义CSS和i18n ...所以我写了一篇post关于改变Alfresco的Aikau页脚。

+1

当您尝试访问您的帖子时,目前有404错误。如果你可以提供它,阅读会很有趣。 –

+0

糟糕,评论更新) – streetturtle

+0

感谢您更新链接 - 这是一个非常好的例子。 –