PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

How to limit search to one of my categories?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to limit search to one of my categories?

    Hi,
    I have the Zoom Search working great on my site and the search page uses several categories. I have a search box on my front page that works great.

    What I would like to do, it add another search box to my news archive page which will limit its search key words to one of my categories (in this case news). Is it possible to limit a search box to just one category?

    Thanks!

  • #2
    Yep. Take a look at this FAQ:
    Q. How do I put search forms on pages besides the search page? (Or define my own search form?)

    Refer to the section under the heading 'Defining a search form for a categories enabled website' in particular. As you will see, you can specify a hidden input tag for a category which the user won't see or be able to change, thereby allowing you to limit the search to a particular category. Say the category number for your "News" category is 0, then you will just need a tag like so within your custom search form:

    Code:
    <input type="hidden" name="zoom_cat[]" value="0">
    Hope that helps.
    --Ray
    Wrensoft Web Software
    Sydney, Australia
    Zoom Search Engine

    Comment


    • #3
      Excellent, thanks for that!

      LOL! Actually, my news category is selected by category 0 as in your example!
      Last edited by The Old Man; Oct-16-2007, 06:09 AM.

      Comment

      Working...
      X