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

My search result page is showing list items along with list name.But i dont want list name in search result. Please advice.

Thanks.

share|improve this question
add comment

1 Answer

SharePoint Server (or Search Server Express) If running SharePoint Server (or Search Server Express) you can change the XSLT used to display the search results:

  1. Go to the search result page
  2. Put it in Edit mode
  3. On the Search Core Result Web part select "Edit Web Part"
  4. Open the Display Properties category
  5. Deselect "Use Location Visualization"
  6. Click XSL Editor
  7. Remove the following section:

.

<span class="srch-URL2" id="{concat($currentId,'_Url')}">  
  <xsl:choose>  
    <xsl:when test="hithighlightedproperties/HHUrl[. != '']">  
       <xsl:call-template name="HitHighlighting">  
          <xsl:with-param name="hh" select="hithighlightedproperties/HHUrl" />   
       </xsl:call-template>   
    </xsl:when>  
    <xsl:otherwise>  
       <xsl:value-of select="url"/>  
    </xsl:otherwise>   
  </xsl:choose>
</span>

SharePoint Foundation
If you're running pure SharePoint Foundation, I recommend that you "upgrade" to Search Server Express if you want to use Search for anything except the most simple search on the current site.

If you stay with the pure Foundation, then you have no way of changing the XSLT, then your only option is to add css to remove the URL.

.srch-URL2 {
  display:none;
}

This can be inserted into the master page or in a Css file which is the set as AlternateCSS which can be done in PowerShell like this:

$w = Get-SPWeb http://spf-dev
$w.AlternateCssUrl = 'http://spf-dev/Style%20Library/MyCss.css'
$w.Update()

This needs to be done on all Sites where you need it :-(

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.