I understand you can set the site collection's search scope settings at "Site Collection Administration>Search Settings". Is there a way, in SharePoint 2010 Foundation, we can set the scope solely for my site, rather than the entire collection?
1 Answer
This solution only works if it is a quality of life issue only
For this I ended up using the path advanced search filter. I just set it in the template as append to query.
This is what I ended up with:
<div id="searchLayout">
<SPSWC:SearchBoxEx AppendToQuery="false" AppQueryTerms="Request.Url.AbsoluteUri" QueryPromptString="Search News..." id="SearchBox" RegisterStyles="false" TextBeforeTextBox="" TextBoxWidth="200" GoImageUrl="" GoImageActiveUrl="" GoImageUrlRTL="" GoImageActiveUrlRTL="" UseSiteDefaults="true" DropDownMode="HideScopeDD" SuppressWebPartChrome="true" runat="server" WebPart="true" __WebPartId="{0043945F-2D2B-4A02-8510-CED13B6F04DF}"/>
<script type="text/javascript" defer="defer">
var url = window.location.pathname;
document.getElementById("ctl00_PlaceHolderMain_SearchBox_ctl00").value = "path:" + url.substring(0,url.lastIndexOf('/')) + "";
</script>
</div>
-
To my great displeasure, I don't have the option of editing the template.– PeteOct 3, 2012 at 17:13