I am trying to add custom action in Aikau search result Page.
I am using sdk2 for testing.
Below thing I have tried.
Extension File :
<extension> <modules> <module> <id>Add custom action in search result page</id> <version>1.0</version> <auto-deploy>true</auto-deploy> <customizations> <customization> <targetPackageRoot>org.alfresco.share.pages.faceted-search </targetPackageRoot> <sourcePackageRoot>com.example.faceted-search</sourcePackageRoot> </customization> </customizations> </module> <module> <id>aikau-share - Example Aikau Widgets</id> <version>1.0</version> <auto-deploy>true</auto-deploy> <configurations> <config evaluator="string-compare" condition="WebFramework" replace="false"> <web-framework> <dojo-pages> <packages> <package name="search" location="js/search"/> </packages> </dojo-pages> </web-framework> </config> </configurations> </module> </modules> </extension>
faceted-search.get.js
var searchResultPage = widgetUtils.findObject(model.jsonModel.widgets, "id", "FCTSRCH_SEARCH_RESULT"); if(searchResultPage != null) { searchResultPage.config = { enableContextMenu : false, mergeActions : true, additionalDocumentAndFolderActions : ["example-action"] } } model.jsonModel.widgets.push({ name: "search/action" });
It is not adding custom action in Search result page.
Help Will be appreciated.
The code working but my mistake is I am providing different id in above code.
You need to provide same id which you have provided in share custom action.
ex
if(searchResultPage != null) { searchResultPage.config = { enableContextMenu : false, mergeActions : true, additionalDocumentAndFolderActions : ["example-action"] } }
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.