TwitterLinkedInBlog

Friday, October 23, 2009

SP2007 - How to hide the search scope dropdown and default to a custom scope with a space in the name

<...SearchBoxEx ... DropDownMode = "HideScopeDD" AppendToQuery="false" AppQueryTerms="Scope:&quot;My Scope&quot;" ... />

Update:
Since hiding the dropdown disables the scope parameter passed into the search results page, the customized search results page wasn't receiving the s parameter it was expecting. I ended up changing the DropDownMode back to ShowDD and added the following jQuery to a CEWP on just the home page:

<script type="text/javascript" src="/_layouts/jQuery/jquery-1.3.2.min.js"></script>

<script type="text/javascript">
$(".ms-sbscopes").hide();
</script>

No comments: