This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit

eZ Community » Forums » Developer » Specific folders search

Specific folders search

Specific folders search

Monday 07 April 2003 1:25:32 pm - 1 reply

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.


Friday 11 April 2003 4:15:02 pm

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" />

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" />



You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from