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 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

share|improve this question
1  
It is always easier to help you out if you add a code snippet :) –  Robert Lindgren Sep 2 '13 at 10:16
    
How is the Managed Property Site configured? Compared to SPSiteURL –  Robert Lindgren Sep 3 '13 at 7:18
    
SPSiteURL is giving the site collection url. my document coming from sreddyb.sharepoint.com/sites/ConsumeSandbox/salescloud site. But the SPSiteURL is giving the site collection url(ConsumerSandBox), I dont know which property gives the correct Url for site path, i tried all managed properties to get the site url(sitename,SPSiteURL,SitePath). SitePath giving the url to the folder/document library. but I need only site url, because i'm making somee csom calls, and constructing version history link to document. –  Sekhar2815 Sep 3 '13 at 7:23
    
Have you made Site yourself? What is Path giving you? –  Robert Lindgren 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 –  Sekhar2815 Sep 3 '13 at 7:25
show 8 more comments

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.