Forums / Developer / Limit search to one "branch" of a section?

Limit search to one "branch" of a section?

Author Message

Sven Ryen

Thursday 10 July 2003 8:25:23 am

Hi!

Is there any way to limit search to one specific branch within a section? How narrow is it possible to make the "selection" of what to preform a serch on?

Bruce Morrison

Thursday 10 July 2003 4:56:44 pm

Hi

The following works in 3.0.2

The SubTreeArray variable can be used to limit the search to a specific subtree or subtrees.

<input type="hidden" name="SubTreeArray[]" value="23">

It must be noted that only the main nodes are returned in the search, so if a content object matches the search but its main node is outside of the subtree set by this variable it will not be returned.

Cheers
Bruce
designIT

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

Sven Ryen

Friday 11 July 2003 8:39:13 am

Thanks, Bruce, for enlightening me on the SubTreeArray[]

I'm a bit confused about your mention of main nodes and content objects. Do you mean objects and attributes? or is there some hidden mechanism for defining nodes as "main nodes" that I have missed. To me, all nodes/objects "look the same"...

The SubTreeArray[] isn't limited to the original content classes that shipped with the EZ installation?

Karsten Jennissen

Friday 11 July 2003 8:41:06 am

Here is some info on that:
http://ez.no/developer/ez_publish_3/documentation/general_information/concepts/building_blocks