How to create a custom search results page in MOSS 2007

Posted on 2009-02-12
Last Modified: 2012-05-06

I have created a subsite in a MOSS 2007 installation, where I need to enable the users with local search functionality, i.e. sub-site content search only (docs, lists, pages, etc).

I need to create a page where to place a Search Box web part so as the users will type a query and the search will return results ONLY from the contents of the subsite (document libraries, lists, pages, etc), i.e. I do NOT want to get search results from the parent site or anywhere else BUT the current site.

I would like to be able to present the results of the search on the same page (if possible) using the functionality of the Search Paging web part, along with statistics provided by the Search Statistics and Search Summary web parts.

So far, I have managed to edit the Search Box web part, and selected "Contextual Scope" which seems to restrict results based on the current site, which is what I want. To be honest, I do not know whether this is the "correct" setting per se that I am looking for.

Also, I would like to hide the combobox on the left of the search box web part (the scope combo), since the users cannot change the search scope anyway, so I don't see why they should see that in the first place.

I have tried to place the Search Core Results web part on the same page with my Search Box web part, but I cannot get the search results shown on this page, since when I click the search icon I always get redirected to a "standard" search results page using a the OSSSearchResults.aspx "search page template" of MOSS.

I would appreciate a complete solution if anyone could help...

Thank you all for your time.
Question by:devshed
    LVL 51

    Expert Comment

    You can change the behavior of the search web part to use a specific default scope and hide the other scopes.  That would do what you need.

    Author Comment

    Like I said above, I have sort of managed to display results based on the contents of my site, but I need a way to present search results on the same page and not the default search results page of MOSS.

    The problem is that i cannot return easily back to my page, so I guess it will be difficult for my users to be able to return back to the search page after following some search result.

    I need some guidance on how to achieve what I outline above, so please provide any feedback you have on that direction.

    Thank you for your time.
    LVL 51

    Expert Comment

    OK, all of the default web search parts on any master page/layout for a site template can be hidden.

    I'm assuming you aren't happy with the 'This Site:' option on the default search which would do what you need.

    In fact, we had the opposite problem, we didn't want to go to the site collection search results and instead wanted ALL searchs to go back to our main search page.

    Have you tried adding the search results web part to your page?  I'm not sure it will work but it's worth a try.  Generally the search results page is a special page.  If you look closely at the default search site there is two primary pages.  The main search page and the search results page.

    Accepted Solution

    I have tried placing the search results page on my page where the search query web part resides, but no matter what I tried, I cannot seem to make it present the search results on the same page.

    I need to have my page presenting the user with BOTH the search query web part and the search results web part. I have managed to only have the "This site:" search scope selection on the search scopes selection combobox, although I would not mind if I could hide this altogether. However, my main issue is how to place search result web part on my page.

    So far, no success.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    If you create your solutions on SharePoint sooner or later you will come upon a request to set  permissions of the item depending on some of the item's meta-data - the author, people assigned as approvers, divisions, categories etc. The most natu…
    The System Center Operations Manager 2012, known as SCOM, is a part of the Microsoft system center product that provides the user with infrastructure monitoring and application performance monitoring. SCOM monitors:   Windows or UNIX/LinuxNetwo…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now