New in 1.54.0

andIsInsideSubtreeOf(obj)

Adds a subtree subquery to the given ObjSearch instance.

Unlike andIsChildOf, which matches only direct ancestors (children) of the given object, andIsInsideSubtreeOf returns a search that matches all objects in the subtree concerned, including the given obj itself, its children, grandchildren, etc.

If the given obj has no path or is not assigned to a specific site, i.e., its siteId is null, the result will only contain the given obj.

Params

  • obj (Obj) – The content object.

Returns

ObjSearch

Example

Find all objects that are inside the "/products" subtree: