How can i add an element in header bar next to the repository ?
are there any tutorials that explain these kind of customizations.
I tried this one https://community.alfresco.com/community/ecm/blog/2013/09/04/customizing-the-share-header-menu-part-... , but I think I am missing other stuff.
Solved! Go to Solution.
Hi,
Alfresco header bar is developed with aikau way.
You can add new menu to header bar using extension module.
1)Create *.xml file at below path and add code.
share\src\main\amp\config\alfresco\web-extension\site-data\extensions\xxx.xml.
<extension>
<modules>
<module>
<id>Add custom menu item to header</id>
<version>1.0</version>
<auto-deploy>true</auto-deploy>
<customizations>
<customization>
<targetPackageRoot>org.alfresco.share.header</targetPackageRoot>
<sourcePackageRoot>com.example.header</sourcePackageRoot>
</customization>
</customizations>
</module>
</modules>
</extension>
2)Create share-header.get.js file at below path and add code.
share\src\main\amp\config\alfresco\web-extension\site-webscripts\com\example\header\share-header.get.js
var headerMenu = widgetUtils.findObject(model.jsonModel, "id", "HEADER_APP_MENU_BAR");
if (headerMenu != null) {
headerMenu.config.widgets.push({
id: "HEADER_CUSTOM_PROFILE_LINK",
name: "alfresco/menus/AlfMenuBarItem",
config: {
label: "My Tasks",
targetUrl: "/my-tasks" //Here you can add your page url.
}
});
}
Thanks,
Sanjay
Hi,
Alfresco header bar is developed with aikau way.
You can add new menu to header bar using extension module.
1)Create *.xml file at below path and add code.
share\src\main\amp\config\alfresco\web-extension\site-data\extensions\xxx.xml.
<extension>
<modules>
<module>
<id>Add custom menu item to header</id>
<version>1.0</version>
<auto-deploy>true</auto-deploy>
<customizations>
<customization>
<targetPackageRoot>org.alfresco.share.header</targetPackageRoot>
<sourcePackageRoot>com.example.header</sourcePackageRoot>
</customization>
</customizations>
</module>
</modules>
</extension>
2)Create share-header.get.js file at below path and add code.
share\src\main\amp\config\alfresco\web-extension\site-webscripts\com\example\header\share-header.get.js
var headerMenu = widgetUtils.findObject(model.jsonModel, "id", "HEADER_APP_MENU_BAR");
if (headerMenu != null) {
headerMenu.config.widgets.push({
id: "HEADER_CUSTOM_PROFILE_LINK",
name: "alfresco/menus/AlfMenuBarItem",
config: {
label: "My Tasks",
targetUrl: "/my-tasks" //Here you can add your page url.
}
});
}
Thanks,
Sanjay
Thanks Sanjay.
Riadh.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.