06-07-2018 09:20 AM
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.
06-08-2018 01:54 AM
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.
06-08-2018 04:39 AM
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>
...
06-08-2018 05:41 AM
can you please check, opening tag has missing bracket extension>.
I don't see any other issue in this.
06-08-2018 05:54 AM
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?
06-08-2018 05:59 AM
Yes, this xml file should get loaded, but there might be mistakes in other files.can you share all files and location?
06-08-2018 09:03 AM
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.
Explore our Alfresco products with the links below. Use labels to filter content by product module.