AnsweredAssumed Answered

Add new buttom on header

Question asked by zazugue on Jun 23, 2016
Latest reply on Jun 28, 2016 by niketapatel
Hellow guys. I am trying to add a new buttom on the header. So i followed this tutorial https://www.alfresco.com/blogs/developer/2013/09/16/customizing-the-share-header-part-3/

And i make a new java project and made this hierarchy :

Project
|
|–> alfresco
|    |
|    |–> site-data
|    |      |
|    |      |–> custombuttom.xml
|    |
|    |–> site-webscripts
|          |
|          |–> share-header.get.js
|
|–> build.xml



Inside custombuttom.xml
————————


<extension>
  <modules>
    <module>
      <id>Add Buttom Exersys</id>
      <version>1.0</version>
      <customizations>
        <customization>
          <targetPackageRoot>org.alfresco.share.header</targetPackageRoot>
          <sourcePackageRoot>custom-header</sourcePackageRoot>
        </customization>
      </customizations>
    </module>
  </modules>
</extension>



————————

Inside share-header.get.js
————————


//<import resource="classpath:/alfresco/site-webscripts/org/alfresco/share/imports/share-header.lib.js">
var headerMenus = widgetUtils.findObject(model.jsonModel, "id", "HEADER_APP_MENU_BAR"); //Retrouve l'objet Menu Bar
var NewAppItems = [
{
         id: "HEADER_EXERSYS",
         name: "alfresco/menus/AlfMenuBarItem",
         config:
      {
            label: "header.menu.exersys.label",
            targetUrl: "alfresco/service/exersys/"
         }
}
];
headerMenus.appItems = NewAppItems; //L'attribut appItems permet d'ajouter l'objet à gauche



The problem is when i deploy in alfresco, i found it in "http://localhost:8080/share/page/modules/deploy" and activate it but nothing change and i don't have error in logs.

Did i forgot something?
Thank in advance ><"

Outcomes