Custon Action - Aikau Search Result Page

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Senior Member II

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 

Thanks & Regards,
Sanjay
2 Replies
Highlighted
Alfresco Employee

Re: Custon Action - Aikau Search Result Page

Hope this helps:

https://contezza.nl/techno-customizing-the-search-results-widget-alfresco-5-0-d/

Software Engineer in Alfresco Search Team.
Highlighted
Senior Member II

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?

Thanks & Regards,
Sanjay