Adding fields to peopleresults.aspx in display templates Sharepoint 2013 -


on people search results page (peopleresults.aspx) need add in work phone , cell phone display when person searched. altered display template , got work phone display, cell phone isn't showing up. idea why might be? can offer appreciated. here code. included relevant code pieces:

<mso:managedpropertymapping msdt:dt="string">&#39;aboutme&#39;:&#39;aboutme&#39;,&#39;accountname&#39;:&#39;accountname&#39;,&#39;baseofficelocation&#39;:&#39;baseofficelocation&#39;,&#39;department&#39;:&#39;department&#39;,&#39;hithighlightedproperties&#39;:&#39;hithighlightedproperties&#39;,&#39;interests&#39;:&#39;interests&#39;,&#39;jobtitle&#39;:&#39;jobtitle&#39;,&#39;workphone&#39;:&#39;workphone&#39;,&#39;cellphone&#39;:&#39;cellphone&#39;,&#39;lastmodifiedtime&#39;:&#39;lastmodifiedtime&#39;,&#39;memberships&#39;:&#39;memberships&#39;,&#39;pastprojects&#39;:&#39;pastprojects&#39;,&#39;path&#39;:&#39;path&#39;,&#39;pictureurl&#39;:&#39;pictureurl&#39;,&#39;preferredname&#39;:&#39;preferredname&#39;,&#39;responsibilities&#39;:&#39;responsibilities&#39;,&#39;schools&#39;:&#39;schools&#39;,&#39;serviceapplicationid&#39;:&#39;serviceapplicationid&#39;,&#39;sipaddress&#39;:&#39;sipaddress&#39;,&#39;skills&#39;:&#39;skills&#39;,&#39;userprofile_guid&#39;:&#39;userprofile_guid&#39;,&#39;workemail&#39;:&#39;workemail&#39;,&#39;workid&#39;:&#39;workid&#39;,&#39;yomidisplayname&#39;:&#39;yomidisplayname&#39;</mso:managedpropertymapping>   <body>     <div id="item_personphones"> <!--#_                      if(!$isnull(ctx.currentitem) && !$isnull(ctx.clientcontrol)){                         var id = ctx.clientcontrol.get_nextuniqueid();                         var itemid = id + srch.u.ids.item;                         var hoverid = id + srch.u.ids.hover;                         $setresultitem(itemid, ctx.currentitem);                         var container_id = id + "_peoplecontainer";                         var hhprops = srch.u.createxmldocument("<root>" + ctx.currentitem.hithighlightedproperties + "</root>");                         var encodedpath = $urlhtmlencode(ctx.currentitem.path);                         var has_pn = !$isemptystring(ctx.currentitem.preferredname);                         var has_sip = !$isemptystring(ctx.currentitem.sipaddress);                         var has_email = !$isemptystring(ctx.currentitem.workemail);                         var has_jt = !$isemptystring(ctx.currentitem.jobtitle);                         var has_dp = !$isemptystring(ctx.currentitem.department);                         var has_wp = !$isemptystring(ctx.currentitem.workphone);                         var has_cell = !$isemptystring(ctx.currentitem.cellphone);                         var has_abme = !$isemptystring(ctx.currentitem.aboutme);                         var has_resp = !$isemptystring(ctx.currentitem.responsibilities);                         var has_pp = !$isemptystring(ctx.currentitem.pastprojects);                         var has_ski = !$isemptystring(ctx.currentitem.skills);                         var has_sch = !$isemptystring(ctx.currentitem.schools);                         var has_int = !$isemptystring(ctx.currentitem.interests);                         var has_vlm = !$isemptystring(ctx.currentitem.profileviewslastmonth);                         var has_vlw = !$isemptystring(ctx.currentitem.profileviewslastweek);                         var has_query = !$isemptystring(ctx.currentitem.profilequeriesfoundyou);                          var isselfsrch = (has_vlm == true || has_vlw == true || has_query == true);                         var delimiter = "";                         var userpersonaid = $htmlencode(id) + "_peopleuserpersona";                         var usip = ctx.currentitem.sipaddress;                         var uemail = ctx.currentitem.workemail;                         var uname = ctx.currentitem.preferredname;                         var upicurl = ctx.currentitem.pictureurl;                         var hoverurl = "~sitecollection/_catalogs/masterpage/display templates/search/item_person_hoverpanel.js"; _#-->    <!--#_                                          if(has_wp == true) { _#-->                                             <div id="workphonefield"> <!--#_                                                  var encodedwphone = $htmlencode(ctx.currentitem.workphone);                                                 var displaywphone = srch.u.getsinglehhxmlnodevalue(hhprops, "workphone");                                                 if ($isemptystring(displaywphone)) { displaywphone = encodedwphone } _#-->                                                  <div id="workphonevalue" class="ms-srch-ellipsis" title="_#= encodedwphone =#_"> _#= displaywphone =#_ </div>                                             </div> <!--#_                                          } _#-->  <!--#_                                          if(has_cell == true) { _#-->                                             <div id="cellphonefield"> <!--#_                                                  var encodedcellphone = $htmlencode(ctx.currentitem.cellphone);                                                 var displaycellphone = srch.u.getsinglehhxmlnodevalue(hhprops, "cellphone");                                                 if ($isemptystring(displaycellphone)) { displaycellphone = encodedcellphone } _#-->                                                  <div id="cellphonevalue" class="ms-srch-ellipsis" title="_#= encodedcellphone =#_"> _#= displaycellphone =#_ </div>                                             </div> <!--#_                                          } _#--> 


Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -