MOSS 2007: Connect a custom Search Page to a custom Search Scope 

Author: Tobias Zimmergren
Url:
http://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

  1. Navigate to your Search Center (http://yourcompany/SearchCenter)
  2. Choose "Site Actions -> Create Page"
  3. Create a new Search Page by using the "(Welcome Page) Search Page" template and fill in your details

It should look like this:
customsearchpagescope1

Create a custom Search Results Page

  1. Make sure that you are back at the Search Center site
  2. Choose "Site Actions -> Create Page"
  3. 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:
customsearchpagescope2

Add the newly created Search Page to the tablist in your Search Center

  1. Make sure that you are back at the Search Center site
  2. 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:
customsearchpagescope3

  1. Navigate to "Tabs in Search Pages"
  2. Choose "New -> New Item"
  3. Enter the Title, Page (The page.aspx you created earlier. I used ZimmerSearch.aspx) and optionally enter a Tooltip
  4. Click "OK"
  5. 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

  1. In the top of your left menu you will see "View All Site Content", Click it.
  2. 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:
customsearchpagescope4

Connect your Search Page  with your Search Results Page

  1. Click on your newly created Tab
  2. Choose "Site Actions -> Edit Page"
  3. Choose "Edit -> Modify This Shared Web Part" on your Search Box
    customsearchpagescope5
  4. Under the "Scopes Dropdown" section choose "Show, do not include contextual scopes" in the Dropdown mode
  5. Enter a Dropdown label if you'd like

It should look something like this:
customsearchpagescope6

  1. Expand the "Miscellaneous" section
  2. Enter your Search Results Page filename into the "Target search results page URL" textbox (I used ZimmerSearchResults.aspx)
  3. Click "Ok"

Now publish the page and it should look something like this:
customsearchpagescope7

Make sure it works

  1. Make a search on your custom Search Page
  2. Make sure that the url contians your custom Search Results Page
    (Mine is: http://zimmer/SearchCenter/Pages/ZimmerSearchResults.aspx)
  3. It works!

Can I bind the Search Page to a specific Scope?

Of course you can. Follow these steps:

  1. 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)
  2. Choose "New Display Group"
  3. Enter a Title (Important: Remember this name!)
  4. Choose your Scope in the Scopes list
    customsearchpagescope8
  5. Make sure it's also the Default Scope
  6. Click OK

Your displaygroup should be shown with a scope, similar to this:
customsearchpagescope9

  1. Go back to your Search Center
  2. Navigate to your custom created Search Page
  3. Again, choose "Site Actions -> Edit Page"
  4. Expand the "Miscellaneous" section
  5. Locate the "Scope Display Group" text box
  6. Enter your newly created Display Group (The name of the display group, mine was Zimmer)
  7. Click "OK"
  8. Publish your page

The Dropdown with Scopes should now only contain your newly added Display Group, similar to the following screenshot:
customsearchpagescope10

And what do you know... It works :)

Thanks for taking your time to read this, please leave a comment or two :)

 
Posted on 25-Aug-07 by Zimmergren
26 Comments  |  Trackback Url  |  Link to this post | Bookmark this post with:        
Tags: Search, Search Results Page, Search Scope, SharePoint
 

Links to this post (Trackbacks/Pingbacks)

Levitra.

Trackback from Levitra. on 07 Jan 2009 12:11

Comments

Thursday, 25 Sep 2008 11:25 by Chris
Hi, This post was extremely helpful. Thanks for providing it. I have one question I hope you may be able to help me with or possibly point me in the right direction. I created a custom Advanced search page for my custom Search page. When I go to the Advanced search page the tab for my custom search page does not highlight. Using your example, if I was on the Zimmer home page the Zimmer tab would be highlighted. If I clicked on Advanced search and went to the Zimmer advanced search page. The Zimmer tab is no longer highlighted. This is not the case with All Sites. If you are on the default.aspx page and click Advanced search the All Sites tab remains highlighted. Any ideas on how to "link" the search page to the Advanced search page? TIA for any help or insight. c*

Name:
URL:
Email:
Comments:


MCTS WSS 3.0 (Developer and Administration/Configuration) MCTS MOSS 2007 (Developer and Administration/Configuration) MCP