Custon Action - Aikau Search Result Page

cancel
Showing results for 
Search instead for 
Did you mean: 
sanjaybandhniya
Intermediate

Custon Action - Aikau Search Result Page

I am trying to add custom action in aikau search result page.

I have read the document and found that using following way we can add custom action.

 

1)documentAndFolderActions

2)additionalDocumentAndFolderActions

3)

{
name: "alfresco/renderers/Actions",
config: {
mergeActions: true,
customActions: [
{
id: "CUSTOM",
label: "Custom Action",
publishTopic: "CUSTOM_ACTION_TOPIC",
publishPayloadType: "CURRENT_ITEM",
type: "javascript"
},
],
widgetsForActions: []
}
}

Can anyone help me to how to add custom action in aikau search result page.

 

@afaust @ddraper 

2 Replies
angelborroy
Alfresco Employee

Re: Custon Action - Aikau Search Result Page

sanjaybandhniya
Intermediate

Re: Custon Action - Aikau Search Result Page

I have tried below code and it is working.

   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({
    id: "EXAMPLE_LISTENER",
    name:"search/action"
});

From the above link,I have tried to display mimetype and Its working. How can I use that code to add custom action?