Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

Display template

$
0
0

Hi -

I'm not a developer - and no one in the company to ask - so here goes: 

when this is stated in a Display template: <!--#_  - is this commented out or? 

having trouble with showing specific User Property (TeamId) in a display template that is used on the user profile

got a variable:  var has_dp = !$isEmptyString(ctx.CurrentItem.Department);

then a:

 if (has_dp == true) - does this mean - if the user has a department then don't show the rest or ?  

if(has_dp == true) { _#--><div id="Department"><!--#_ var CostID = $htmlEncode(ctx.CurrentItem.TeamCostID); var TeamID = "(" + CID + ")"; var encodedDept = $htmlEncode(ctx.CurrentItem.Department); var displayDept = Srch.U.getSingleHHXMLNodeValue(hhProps, "department"); if($isEmptyString(CID)){ TeamID = CID; } if ($isEmptyString(displayDept)) { displayDept = encodedDept } var str = ctx.CurrentItem.Department; var res = str.replace("&", "%26"); _#--><div id="DepartmentValue" class="ms-srch-ellipsis" title="_#= encodedDept =#_"> <a href='http://Portal/Sites/Search/Pages/peopleresults.aspx?k=Department:"_#=res=#_"'>_#= encodedDept =#_(_#= ctx.CurrentItem.DepartmentCost =#_)</a></div></div><!--#_ } if(!$isEmptyString(ctx.CurrentItem.TeamName)){ _#--><div id="TeamName">

<a href='http://portal/sites/search/Pages/peopleresults.aspx?k=TeamName:"_#=ctx.CurrentItem.TeamName=#_"'> _#= ctx.CurrentItem.TeamName =#_ _#=TeamID=#_</a> 
</div>                         




Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>