2

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.

1 Answers1

2

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

Raj Rana
  • 90
  • 6
  • Thank you Rana for your help. Acctually what you said is correct. Problem what i'm facing now is Skills values not coming to this page. When I print the values as u said I get nothing. Do you know any other reason which this skills value can be empty? Any changes which I need to do to search schema or somewhere else? – Chinthaka Wimalaratna Dec 03 '15 at 22:08
  • wc,can share your code here.i will check what is the issue. – Raj Rana Dec 04 '15 at 10:50
  • Thank you Rana, I checked and the code u shared with me and it was working fine. Problem was with trail environment which I was working with. After moving my code to the the paid production environment it was working fine. – Chinthaka Wimalaratna Dec 06 '15 at 23:51