I want to edit the SearchBox.js file in Aikau (add a part of code in it), located in alfresco/header folder of the Aikau jar. I have created a share amp with the below:
<extension>
<modules>
<module>
<id>History search extension</id>
<version>1.0</version>
<auto-deploy>true</auto-deploy>
<customizations>
<customization>
<targetPackageRoot>org.alfresco.share.header</targetPackageRoot>
<sourcePackageRoot>customSearchBox</sourcePackageRoot>
</customization>
</customizations>
<configurations>
<config evaluator="string-compare" condition="WebFramework" replace="false">
<web-framework>
<dojo-pages>
<packages>
<package name="customSearchBox" location="js/customSearchBox"/>
</packages>
</dojo-pages>
</web-framework>
</config>
</configurations>
</module>
</modules>
</extension>
var searchbox = widgetUtils.findObject(model.jsonModel.widgets, "id", "HEADER_SEARCH");
if (searchbox != null) {
// Change the widget to our custom menu...
searchbox.name = "customSearchBox/SearchBox";
}
This folder contains all the files of the folder js\aikau\1.0.8.1\alfresco\header of the aikau.jar with the SearchBox.js having the required changes.
This solution works fine as it does what I want, but I don't think it is the correct one as I have to accompany the rest of the header files in my amp. Is there another way to do this aikau edit, so I don't have to copy and include the rest of the header files in my amp?
Thanks in advance!
Read the official Aikau tutorial here Aikau/About.md at master · Alfresco/Aikau · GitHub
Also, I believe this discussion can help you Customizing the aikau search placeholder
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.