I created custom display template for ms word documents, I'm able to get values like Path,SPSiteURL, ServerRedirectURL..etc, but when when i try to access 'Site' im getting null in it, I'm trying to get the site url.

here is the managed properties maapping in my display template

<mso:ManagedPropertyMapping msdt:dt="string">'Title':'Title','Path':'Path','Description':'Description','EditorOWSUSER':'EditorOWSUSER','LastModifiedTime':'LastModifiedTime','CollapsingStatus':'CollapsingStatus','DocId':'DocId','HitHighlightedSummary':'HitHighlightedSummary','HitHighlightedProperties':'HitHighlightedProperties','FileExtension':'FileExtension','ViewsLifeTime':'ViewsLifeTime','ParentLink':'ParentLink','FileType':'FileType','IsContainer':'IsContainer','SecondaryFileExtension':'SecondaryFileExtension','DisplayAuthor':'DisplayAuthor','ServerRedirectedURL':'ServerRedirectedURL','SectionNames':'SectionNames','SectionIndexes':'SectionIndexes','ServerRedirectedEmbedURL':'ServerRedirectedEmbedURL','ServerRedirectedPreviewURL':'ServerRedirectedPreviewURL','RefinableString15':'RefinableString15','RefinableString19':'RefinableString19','RefinableString07':'RefinableString07','ListID':'ListID','ListItemID':'ListItemID','SPSiteURL':'SPSiteURL','ContactName':'ContactName','RefinableString22':'RefinableString22','Site':'Site'</mso:ManagedPropertyMapping>

I'm getting values if I call ctx.CurrentItem.SPSiteURL , ctx.CurrentItem.ListID,ctx.CurrentItem.ListItemID but if I call ctx.CurrentItem.Site I'm getting null value.

I'm trying to get Site Path

  • 1
    It is always easier to help you out if you add a code snippet :) Sep 2 '13 at 10:16
  • How is the Managed Property Site configured? Compared to SPSiteURL Sep 3 '13 at 7:18
  • Have you made Site yourself? What is Path giving you? Sep 3 '13 at 7:25
  • I checked the managed properties in my site collecion SPSiteURL is mapped to ows_SPSiteURL but Site is not mapped to any crawled property Sep 3 '13 at 7:25
  • Well no wonder it returns nothing then ;) Sep 3 '13 at 7:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.