cancel
Showing results for 
Search instead for 
Did you mean: 

Change results URL in AIkau faceted search page

tonyrivet
Champ in-the-making
Champ in-the-making
Hi,

I have some difficulties customizing the Aikau faceted search page, which may be more a matter of lack of my knowledge about dojo/AMD.

What I want to do is to replace the document details page URL by a download URL.

I extended the Search Results Widget to include my own custom module :

var searchResultWidget = widgetUtils.findObject(model.jsonModel, "id", "FCTSRCH_SEARCH_RESULT");
if(searchResultWidget) {
   searchResultWidget.name = "mynamespace/search/CustomAlfSearchResult";
}



I understand search results URLs are rendered this way : AlfSearchResult module > uses SearchResultPropertyLink module > mixins _SearchResultLinkMixin renderer > bring the "generateSearchLinkPayload" function > renders URLs depending on the result type

I want to override this "generateSearchLinkPayload" function but I can't figure out what is the best way to do that.

Thanks in advance for the help !

Tony
2 REPLIES 2

ddraper
World-Class Innovator
World-Class Innovator

Your mileage with this answer will depend upon what version of Aikau you're using...

We made some updates to the AlfSearchResult widget to make it more customizable, essentially breaking it up into a separate functions for each part of widget. So if you want to change how the URL used when clicking on a link then you can override the "createDisplayNameRenderer" function (which by default returns a "SearchResultPropertyLink" widget).

If your custom widget overrides this function to return a custom link widget then you can override its "generateSearchLinkPayload" and/or "getPublishTopic" functions to change where search results go to.

To provide a bit of context here, we wrote the AlfSearchResult widget for performance reasons and perhaps we could have done a better job of making it more customizable. So the method described above will work, but is perhaps more complex than other Aikau customization use cases.

Also, apologies for the delay in answering this question - hopefully it doesn't come too late.

Hi ,  Dave Draper‌ I wants to do the same , I wants to add extra parameters to search result  renders URL 

 I found that the urls generated by JSDoc: Source: renderers/_SearchResultLinkMixin.js file but I don't know how to override this. 

Hi , Tony Rivet _‌ , How you have done this  ?

please help.