I'm developing AMP file for the Share tier and I want to override the search order. Currently, the sorting performed by fullName
. In my case I need sorting by lastName
.
In people-finder.js
I found this line:
...
/**
* Build URI parameter string for People Finder JSON data webscript
*
* @method _buildSearchParams
* @param searchTerm {string} Search terms to query
*/
_buildSearchParams: function PeopleFinder__buildSearchParams(searchTerm)
{
return "sortBy=fullName&dir=asc&filter=" + encodeURIComponent(searchTerm) + "&maxResults=" + this.options.maxSearchResults;
}
...
I think, that I should override sortBy
parameter from fullName
to lastName
. I have done some experiments locally and saw that changes in those values make affect to the sorting.
How can I do it?
As Sanjay Patel noted, I created the following path and place relevant JavaScript files there:
share\src\main\amp\res\components\people-finder
I tried this way too - share\src\main\amp\web\components\people-finder\
But now on the embedded local Tomcat all works fine and I can see that JavaScript file was overridden:
But on the production server I get the following:
What I was tried to do:
- delete
alfresco
andshare
directories fromwebapps
; - clear the browser's cache;
- uninstall AMP from Share and install again. Check, that it present in Share;
- perform a full reindex with Solr
Nothing helps.. All of that not helped to override the people-finder.js
What could be the reason?