sharepointsharepoint-2013sharepoint-search

SharePoint online people search display template showing skills managed property


I'm currently working on creating a custom display template for people search result page. I copied out of the box Item_Person.html search display template and modified it to display some more fields. In the out of the box template also there is a managed property called skills but when I using it, its not returning any values associated with the user profile skills property (SPS-Skills).

enter image description here

As you can see its already mapped but Skill value always comes as empty. I want to retrieve and display inside the custom template.

Please help me if you have done something similar.


Solution

  • Check the following steps

    1. Add meta data to ManagedPropertyMapping enter image description here

    2.Then inside the fuction get the value of metadata

    <!--#_  var datacreated = $getItemValue(ctx, "Created");_#-->
    

    3.Then palce the variable where you want <h2> _#= datacreated =#_ </h2>

    Thats it publish the html hope its work