Forums / Developer / Specific folders search

Specific folders search

Author Message

Alexei Pechekhonov

Monday 07 April 2003 4:25:32 am

Could somebody please let me know how I can make searches specific
to certain folders. I wish to place a check-box next my search and allow
users to tick which areas they would like to search?

Doing searches over a single folder or all folders is easy, but I am
unclear on how to search over 3 or 4 specific ones only.

Thanks
Alexei

Bård Farstad

Friday 11 April 2003 7:15:02 am

To create a search which searches only in the current, or any given node you can do something like this:

<form action="/content/search/" method="get">
<input type="text" name="SearchText" id="Search" value="" />
<input class="searchbutton" name="SearchButton" type="submit" value="Search" />
<input type="hidden" name="SubTreeArray[]" value="42" />
</form>

Where 42 is replaced by the ID of the node you want to search in. Note: this will search in this node and any subnode.

You can also search in several nodes by adding several hidden variables like:
<input type="hidden" name="SubTreeArray[]" value="42" />
<input type="hidden" name="SubTreeArray[]" value="43" />

--bård

Documentation: http://ez.no/doc