PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Excluding specific Category results from searches for "All"

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

  • Excluding specific Category results from searches for "All"

    Hi, I have a search box and a category dropdown that defaults to "All"
    I need to have searches for "all" exclude a particular category in the dropdown and only have results in that category if they choose to search the category (in the dropdown).

    For example, Page 1 belongs to Category 1, page 2 belongs to category 2, page 3 belongs to category 3.
    All pages share the same key words (for arguments' sake).
    I'd like to "lock down" Category 2 so that a search for "All" only returns Page 1 & 3 and if I choose Category 2 in the dropdown, only page 2 returns.

    I am running an ASP installation of version 6

    Any theories how this can be acheived?

    Thanks in advance

    Chris

  • #2
    You will have to code up your own search form to get the behavior you are after.

    First enable "Allow searching in multiple categories" in your config. Then see the following FAQ about creating your own search form, this should get you started. You'll then need to implement some JavaScript for your search form to handle which categories should be passed onto the search script.

    Comment

    Working...
    X