SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When editing the XSLT for the search results web part I'd like to know when the result represents a document or, for that matter, a list item and then.. I'd like to be able to display a link to the library rather than only deep-linking directly to the document.

Do you think that a substring with last-index-of ("/") XSLT would be the best way to omit the document-name itself from the search results so that you can send someone to the document library or folder where the search result resides?

share|improve this question

Matthew McDermott posted some XSLT scripts, including one that does this, on CodePlex here:

share|improve this answer
Thanks kindly.. I'll check it out. – Anonymous Jul 29 '10 at 14:26

Your Answer


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