Yesterday I wrote about the SmallSearchInputBox, how scopes only appear if you set a search center for the site collection, and how to set the Search Center in code.
Well, as is typically the way with CAML, I figured out how to do this declaratively later. Or, more specifically, I found that there is a feature I could call declaratively that would do what I want:
<!-- SearchCenter Url feature -->
<Feature ID="7AC8CC56-D28E-41f5-AD04-D95109EB987A" >
<Property Key="SearchCenterUrl" Value="~SiteCollection/Search/" />
Yup, all I need to do is put that into my site definition…
2 thoughts on “Declaratively Point a Site Collection at a Search Center”
Note to people using this…this feature is Site scoped not Web scoped 😉 ie. within SiteFeatures not WebFeatures
Yup. Isn’t it lovely that SharePoint is so confused as to what a ‘site’ is?
But this is a ‘Site Feature’ not a ‘Web Feature’ so it actually applies at a Site Collection level.