Thursday, 12 February 2009

Creating a Scope and Tab for MOSS Search Center

Creating a Scope and Tab for MOSS Search Center

I am occasionally asked how to create a tab in the MOSS Search Center to search a given scope. This process is often confusing to administrators because it involves the creation of a scope, making the scope available, and then the creation of not just one, but two tabs in Search Center along with ASPX pages. Before beginning, this article assumes that you already have the Shared Services Provider (SSP) properly set up and that you have a "Search Center with Tabs" site available in your portal. For my example, I'll create a tab designed to search a specific document library that contains HR documents. Note that this article does not cover creating an "Advanced Search" capability - just a simple keyword search.


Create the Shared Scope

The first step is to create a Shared Scope that will target the document library. This Shared Scope will be set up in the Shared Services Provider using the following steps:

  1. On the home page of the Shared Services Administration site, click "Search Settings"
  2. On the Search Settings page, click "View Scopes"
  3. On the View Scopes page, click the "New" button
  4. On the Create Scope page
    - Enter HR Documents in the Title field
    - Leave the results page using the default page, you'll change that later
    - Click the OK button.
  5. On the View Scopes page, locate the new scope and click the "Add Rules" link
  6. On the Add Scope Rule page
    - Set the Scope Rule Type to "Web Address"
    - Set the Web Address to "Folder"
    - Enter the complete URL to the Document Library (e. g. , http://litwareinc.com/HR/HR%20Documents).
    - Click the OK button.
  7. Return to the Search Settings page
  8. Under the Scopes section, click the "Start Updates Now" link

When you have completed creating the scope and updating it, you should be able to see that it contains a number of documents. This is a good check that you have created the scope correctly and it contains the number of documents that you expect.


Make the Shared Scope Available in the Site Collection

An optional step is to make the new scope available to the site collection where the Search Center is located. Follow these steps to do that:

  1. From the home page of your portal, select Site Actions>>Site Settings>>Modify All Site Settings
  2. On the Site Settings page, under the Site Collection Administration page, click the "Search Scopes" link

On the View Scopes page, you should see the new scope listed under the Unused Scopes section. At this point, you could easily add the scope to the Search Dropdown that appears at the top of the page in MOSS by clicking on the "Search Dropdown" link appearing in the "Display Group: Search Dropdown" section. However, our goal is to create a tab for the search scope.

Create the Search Center Tab

New tabs for Search Center involve several different parts. First, you must create a search page. Then you must create a search results page. Finally, you must associate the scope with the new pages and create tabs to display them. Follow these steps to get it all working:

  1. From the Search Center page, select Site Actions>>Create Page
  2. On the Create Page
    - Enter HR Documents Search in the Title field
    - SharePoint should automatically generate a valid page name
    - Select "Search Page" from the list of available Page Layouts
    - Click the Create button
  3. A new page should now be visible with a Search Box web part
    - Select Modify Shared Web Part from the web part's edit menu
    - Expand the Miscellaneous section
    - Enter HRDocumentsResults.aspx in the Target Search Results Page URL field (you will create this page next)
    - Uncheck the box labeled "Display Advanced Search Link"
    - Click the OK button
    - Click the Publish button at the top of the page
  4. From the new page, select Site Actions>>Create Page
  5. On the Create Page
    - Enter HR Documents Search Results in the Title field
    - SharePoint should automatically generate a valid page name
    - Select "Search Results Page" from the list of available Page Layouts
    - Click the Create button
  6. A new page should now be visible with a several search web parts
    - Select Modify Shared Web Part from the Search web part's edit menu
    - Expand the Miscellaneous section
    - Enter HRDocumentsResults.aspx in the Target Search Results Page URL field
    - Uncheck the box labeled "Display Advanced Search Link"
    - Click the OK button
    - Select Modify Shared Web Part from the Search Core Results web part
    - Expand the Miscellaneous section
    - Enter HR Documents in the Scope field
    - Click the OK button
    - Click the Publish button at the top of the page
  7. From the new page, select Site Actions>>View All Site Content
  8. On the All Site Content page, click the "Tabs in Search Pages" link
  9. On the Tabs in Search Pages list, click the New button
  10. On the New Item page
    - Enter HR Documents in the Tab Name field
    - Enter HRDocumentsSearch.aspx in the Page field
    - Click the OK button
  11. From the list, select Site Actions>>View All Site Content
  12. On the All Site Content page, click the "Tabs in Search Results" link
  13. On the Tabs in Search Results list, click the New button
  14. On the New Item page
    - Enter HR Documents in the Tab Name field
    - Enter HRDocumentsSearchResults.aspx in the Page field
    - Click the OK button

Return to the Search Center home page and you should now see a new tab visible for HR Documents.


Try out a search and verify the expected results.




http://scothillier.spaces.live.com/blog/cns!8F5DEA8AEA9E6FBB!734.entry

Wednesday, 4 February 2009

Content-Type-Page-Layout-and-Publishing

You might be a bit confused on this ,the types of fields on a page are determined by the content type for the page. Each content type contains columns that correspond to the fields on the page. When you create a content type, you add column templates to the content type for each field. Column templates determine the default field control that is associated with the columns as well as the kind of content the field can contain, such as a single line of text, a hyperlink, or a picture.

Content types for page layouts are based on the Page content type and contain the columns for the fields that can be used on pages based on the page layout. The Page content type is a system content type template created by the Publishing Resources feature. The column templates from Page will be added to all Pages libraries created by the Publishing feature.

By default, the Page content type contains a number of columns that page layouts requires for publishing.