I have added a Custom Managed Property to an Item Display Template in SharePoint 2013. This template is used along with a Control Display Template to display People search results in table form. The Control Display Template renders the column headers and the Item Display Template renders each result item. It works perfectly.
I have also added a People Results Block to the Everything Search Results (Using Steve Mann's blog post). This also works fine using the default templates.
However I want this Result Block to also appear as a small table. So in the Query Rule I use a new Group Display Template which renders the column headers and I use the same Item Display Template as before.
Again this all works fine except for the fact that the Custom Managed Property does not show up in the Item Display Template when it is called from the Result Block.
When I look at the Item Display Template code in the debugger, ctx.CurrentItem
contains the property in the one case but doesn't contain it in the other. In fact the properties of ctx.Current item
are quite different in each case.
This leads me to think that the the Result Type is different even though the Result Block is set to search the "Local People Results (System)" Result Source. It is not returning a Person Result Type. The Person Result Type has been automatically updated with the new property but whatever type that is coming through via the Result Block in Everything Search has not.
How do I get this to work?
Thanks.