MOSS Forum

Ask Question   UnAnswered
Home » Forum » MOSS       RSS Feeds

How to set search default to current context (ShowDD_DefaultContextu

  Asked By: Tristan    Date: Apr 30    Category: MOSS    Views: 1662

I have been asked to set the default for search for our MOSS Enterprise to
always default to search the current context (site if at site level, list if at
list level). I know that if I put a Search Web Part on a page, I can set the
default so that it acts this way. But I can't figure out how to do it for the
GLOBAL (the search box that is on the right-hand side of the header for all
pages). I tried editing the default.aspx for a site with SharePoint Designer, to
see if I could get to it that way, at least for a specific site. I was able to
replace the global search box with the same one I had added as a web part, and
the behavior was proper (defaults to search at the site level) but that only
changed the site main page, not the other pages on the site. So if I go to a
document library on the site, the search in the header defaults to searching
all, not searching the current list.

I have taken a look at the files in the 12 hive under TEMPLATES, even the
ONET.XML, but I can't see anywhere to put in the configuration to default the
search dropdown to ShowDD_DefaultContextual (the value I can see on my added
search web part when I configure it through the browser, and later look at it in
code view with SharePoint Designer). Any ideas?



4 Answers Found

Answer #1    Answered By: Angarika Shroff     Answered On: Apr 30

The default  scope for the global search  box is set  at the site  collection
level. Go to Site Settings > Site Collection Administration column > Search
Scopes. In there you can edit the display group settings and change the
orderof the scopes. The first one will show as the default scope of the
search box.

Answer #2    Answered By: Eliza Hutchinson     Answered On: Apr 30

Thanks, but I don't see in the configuration  any choice for what I want. The
three choices for scope at the site  collection level  for me are All Sites,
Projects (a scope I created), and People. The choice I want, "current context,"
is not listed. How do I get it to show up so that I can make it the default?
Clearly the choice I see is more than just these three of All Sites, Projects,
and People, because if I go to a document library  and do the search  dropdown, it
includes these three (all sites, projects, and people) but also two more: this
list and this site.

Answer #3    Answered By: Lesley Tate     Answered On: Apr 30

We had this requirement as well. Unfortunately you can't set  the "current
context" scope as the default  using the user interface.

I believe we developed a feature that substituted our own version of the MOSS
search delegate control ("SmallSearchInputBox") in the master page. This version
is the same as the standard one except for the property "UseSiteDefaults" set to

Answer #4    Answered By: Chris Daniel     Answered On: Apr 30

Actually, I think it might have been this property that did the trick:

<Property Name="DropDownMode">ShowDD_DefaultContextual</Property>