AnsweredAssumed Answered

What is the right way to edit an existing file in Aikau?

Question asked by hackerkok on Jun 2, 2017
Latest reply on Jun 8, 2017 by douglascrp

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:


  • src\main\amp\config\alfresco\web-extension\site-data\extensions\aikau-searchbox-extension.xml

<id>History search extension</id>
<config evaluator="string-compare" condition="WebFramework" replace="false">
<package name="customSearchBox" location="js/customSearchBox"/>


  • src\main\amp\config\alfresco\web-extension\site-webscripts\customSearchBox\share-header.get.js

var searchbox = widgetUtils.findObject(model.jsonModel.widgets, "id", "HEADER_SEARCH");
if (searchbox != null) {
    // Change the widget to our custom menu... = "customSearchBox/SearchBox";


  • src\main\amp\web\js\customSearchBox

This folder contains all the files of the folder js\aikau\\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!