I'm trying to add an item to the standard Alfresco share header. I'm following the guidelines here
which admittedly is for version 4.2. I'm using 5.2 CE
Using the all-in-one archetype project, I created the following files, as it suggests in the instructions:-
src/main/resources/alfresco/web-extension/site-data/extensions/share-header.xml
src/main/resources/alfresco/web-extension/site-webscripts/com/example/header/share-header.get.js
The contents of these files are as per the tutorial in the above link. However I don't see the new menu item on the share header menu bar.
Am I placing these files in the correct place within the project structure?
Thanks.
Please verify that , inside the share-header.xml file,there is one attribute named as auto-deploy.If it is set to manual , you need to manually deploy the newly installed extension.
For manual deployment you can use below URL.You just need to select your module ==>Click and Add==>Click on Apply Changes.
http://localhost:8080/share/page/modules/deploy
Other thing would be set auto-deply to true.
You can find more details on below link on auto-deply.
Thanks for your reply. Yes the auto-deploy is set to true. But I don't think Alfresco has even picked up this module, because I don't see it on the module deployment page.
I also looked over the log files, and didn't see any problems related to this. Here's my share-header.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>
...
can you please check, opening tag has missing bracket extension>.
I don't see any other issue in this.
Yes, sorry, that was a cut/paste error. The XML is well formed.
So you think this file is in the correct location, and Alfresco should be able to use it?
Yes, this xml file should get loaded, but there might be mistakes in other files.can you share all files and location?
Thanks. I'm actually trying a different approach now, by creating separate projects for my repo and share. Seems like this will be the better way of doing development anyway, because the all in one project takes ages to start up.
With separate projects, you can leave the repo running continuously, and just redeploy share when necessary.
Anyway, using this approach I've successfully defined and deployed my first menu item, and it works!
Thanks for your responses to my questions.
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.