PDA

View Full Version : Creating a second search page in the same site searching only a specific path


Jorik
02-06-2005, 06:44 AM
I already have a search page in my website, searching the entire site.
I want to add a second search page, but that will search through only a specific path, for instance /kb/faq - displaying results for pages only under this paths.
Adding the second search page is not a problem (I think) - but how to make it search only a specific path?

Thanks in advance
Roy.

Charter
02-06-2005, 06:13 PM
Get the site_id from the sites table, and try the following in an HTML form:

<input type='hidden' name='site' value='SITE_ID' />
<input type='hidden' name='path' value='kb/faq/' />
<input type='hidden' name='refine' value='1' />

Alternatively, you could set $site, $path, and $refine in the search.php file.

Jorik
02-09-2005, 05:06 AM
Thanks thanks thanks. My boss likes me better now. :)
Ended up using the PHP variables instead of hidden form fields.
Works great.
Roy.