Hi,
I came across a requirement from a customer to display promoted hits search results as flyout in query suggestions(not in search results web part-current implementation).
Display Templates are there to show the promoted hits – Group_promotedresults.html, Group_promotedresults.js
We are using customjs (querysuggestions.js) to display the query suggestion.
what i am doing is creating a dynamic div in the js file itself and loading the display template html content to it with js. But i am not able to see the results (ctx.RenderItems are not replaced with items).
var itemElement = document.createElement(‘div’);
 itemElement.setAttribute(“id”,”promotedres”);
 $.get(‘http://search.dev.enet/_catalogs/masterpage/display templates/search/group_promotedresults.html’)
 .success(function(data) {
     $(‘#promotedres’).html(data);
 $includeScript(this.url, “http://search.dev.enet/_catalogs/masterpage/display templates/search/group_promotedresults.js”);
 });
 element.appendChild(itemElement);
 return itemElement;
I have attached the screenshots.(Actual.png – current implementation, Desired.png – Needed)Â
Thanks In Advance for the any assistance!!!!!!!!!!!!!!!!!!!!!!!!!!!
Ashwane Singh
Â
Â
Â
Â
Â
Â
Â
Â