MOSS 2007: Connect a custom Search Page to a custom Search Scope
Author: Tobias Zimmergren
Url: http:https:https://zimmergren.net//zimmergren.net//www.zimmergren.net
The other day I got a comment on a post from one of my readers who wanted to know how you can connect your custom created Search Page with a specific Search Scope.
Create a custom Search Page
- Navigate to your Search Center (http://yourcompany/SearchCenter)
- Choose "Site Actions -> Create Page"
- Create a new Search Page by using the "(Welcome Page) Search Page" template and fill in your details
It should look like this:
Create a custom Search Results Page
- Make sure that you are back at the Search Center site
- Choose "Site Actions -> Create Page"
- Create a new Search Results Page by using the "(Welcome Page) Search Results Page" template and fill in your details
It should look something like this:
Add the newly created Search Page to the tablist in your Search Center
- Make sure that you are back at the Search Center site
- Choose "Site Actions -> View All Site Contents"
You will now see one list for the Search Pages and one list for the Search Results Pages, as seen in this picture:
- Navigate to "Tabs in Search Pages"
- Choose "New -> New Item"
- Enter the Title, Page (The page.aspx you created earlier. I used ZimmerSearch.aspx) and optionally enter a Tooltip
- Click "OK"
- You will see your new Tab show up in the list
Add the newly created Search Results Page to the Tablist in your Search Center
- In the top of your left menu you will see "View All Site Content", Click it.
- Repeat the steps from the previous section but use the Search Results Page you created instead.
If you navigate to your Search Center, you will see that your Tab has been added to the Tablist:
Connect your Search Page with your Search Results Page
- Click on your newly created Tab
- Choose "Site Actions -> Edit Page"
- Choose "Edit -> Modify This Shared Web Part" on your Search Box
- Under the "Scopes Dropdown" section choose "Show, do not include contextual scopes" in the Dropdown mode
- Enter a Dropdown label if you’d like
It should look something like this:
- Expand the "Miscellaneous" section
- Enter your Search Results Page filename into the "Target search results page URL" textbox (I used ZimmerSearchResults.aspx)
- Click "Ok"
Now publish the page and it should look something like this:
Make sure it works
- Make a search on your custom Search Page
- Make sure that the url contians your custom Search Results Page
(Mine is: http://zimmer/SearchCenter/Pages/ZimmerSearchResults.aspx) - It works!
Can I bind the Search Page to a specific Scope?
Of course you can. Follow these steps:
- Navigate to the Site’s Scope’s section (I usually just navigate to http://zimmer/**_layouts/viewscopes.aspx?mode=site**)
(This can be done by just navigating to Site Settings, Go to Top Level site settings, Search Scopes) - Choose "New Display Group"
- Enter a Title (Important: Remember this name!)
- Choose your Scope in the Scopes list
- Make sure it’s also the Default Scope
- Click OK
Your displaygroup should be shown with a scope, similar to this:
- Go back to your Search Center
- Navigate to your custom created Search Page
- Again, choose "Site Actions -> Edit Page"
- Expand the "Miscellaneous" section
- Locate the "Scope Display Group" text box
- Enter your newly created Display Group (The name of the display group, mine was Zimmer)
- Click "OK"
- Publish your page
The Dropdown with Scopes should now only contain your newly added Display Group, similar to the following screenshot:
And what do you know… It works :)
Thanks for taking your time to read this, please leave a comment or two :)
Recent comments