0

I want to add some statistics like "Results 1-10 of 572" in my search people result.

I have a personal Control_SearchResult.html file.

I found the code that I have to modify :

 <div class="ms-srch-resultFooter">             
                if(ctx.ClientControl.get_showResultCount() && ctx.DataProvider.get_totalRows() > 0){                        
                    var start = ctx.DataProvider.get_currentQueryState().s;
                    var resultsPerPage = ctx.DataProvider.get_resultsPerPage();
                    var totalRows = ctx.DataProvider.get_totalRows();
                    var countDisplayString = Srch.Res.rs_ApproximateResultCount;
                    var startRows = ctx.DataProvider.get_startRows();
                    if (start + resultsPerPage > totalRows) { countDisplayString = (totalRows == 1)? Srch.Res.rs_SingleResultCount : Srch.Res.rs_ResultCount; }

                    <div id="ResultCount" class="ms-srch-resultscount">
                        _#= String.format($htmlEncode(countDisplayString), $htmlEncode(totalRows.localeFormat("N0"))) =#_
                    </div>

                }       

But I don't see how to modify this code? How to get startRow, rowLimit...?

Or there is another solution?

-2

I found, in the Control_SearchResults.html file, you can custom the result count.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.