After looking at the Search Results control templates, and attempting to remove pieces of the code to trim down the file to contain on the minimum amount to render an item template. Is there a good example of what is required for the control template to render properly?
My goal is to render the custom Item Template below, and add some custom logic to the control template for handling query parameters passed in.
How can I detect when no results or a null value is being returned, and execute a separate JavaScript function?
<body>
<div id="Item_CommonItem_Body">
<!--#_
var id = ctx.CurrentItem.Id;
var legacyItemId = ctx.CurrentItem.LegacyItemId;
var listUrl = ctx.CurrentItem.ListUrl;
var listItemId = ctx.CurrentItem.ListItemId;
var listId = ctx.CurrentItem.ListId;
var siteId = ctx.CurrentItem.SiteId;
var webId = ctx.CurrentItem.WebId;
var title = ctx.CurrentItem.Title;
var parentLink = ctx.CurrentItem.ParentLink;
var spsite = ctx.CurrentItem.SPSiteUrl;
var contentType = ctx.CurrentItem.ContentType;
var action = "/_layouts/15/CopyUtil.aspx?Use=id&Action=dispform";
var completeLink = String.format('<a href="{0}{1}&itemId={2}&listId=
{3}&siteId={4}&webId={5}">{6} </a>', $htmlEncode(spsite), action, listItemId,
htmlEncode(listId), $htmlEncode(siteId), $htmlEncode(webId), title);
_#-->
<div>
<div><span><h1>Unique Item Results</h1></span></div>
<div>
<ul>
<li>Title: _#= title =#_</li>
<li>Legacy ID: _#= legacyItemId =#_</li>
<li>List URL: _#= listUrl =#_</li>
<li>List Item ID: _#= listItemId =#_</li>
<li>List ID: _#= listId =#_</li>
<li>Site ID: _#= siteId =#_</li>
<li>Web ID: _#= webId =#_</li>
<li>Parent Link: _#= parentLink =#_</li>
<li>Completed URL: _#= completeLink =#_ </li>
<li>SPSite _#= spsite =#_</li>
<li>Content Type _#= contentType =#_</li>
</ul>
</div>
</div>
</div>