Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm trying to access the metadata Tags of a SharePoint page within the search result of that page using a Display Template. In the Managed Properties for my search service, the Tags property is available, searchable, queryable, etc. and I've done a full crawl to ensure this property is pulled into the index.

Within the Item_CommonItem_Body.html Display Template, I have 'Tags' property listing within the ManagedPropertyMapping as shown below:

<mso:ManagedPropertyMapping msdt:dt="string">'Title':'Title','Path':'Path','Tags':'Tags',...

Lastly, I'm attempting to display the Tags within the body of the display template using the following:

_#= $htmlEncode(ctx.CurrentItem.Tags) =#_

Using the code htmlEncode code snip above, I'm able to display other aspects of the page such as the Author but I can't seem to get the Tags to display. I've also broke down the ctx.CurrentItem using the IE JavaScript debugger and couldn't find the Tags within the object anywhere. If someone has experienced this before, any help would be much appreciated. Thanks!

share|improve this question
1  
Why don't you use refiners and a enterprise search center? –  Vandoorn Kevin May 24 '13 at 12:46
add comment

1 Answer

In SharePoint 2013 the tags are wrapped up in Social. They are probably accessible through the SocialActor class.

http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.client.social.socialactor.aspx?cs-save-lang=1&cs-lang=csharp#code-snippet-1

Though I am not sure how to change your code to make them available. Hopefully this helps.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.