New in 1.54.0

andIsChildOf(obj)

Adds a subquery for child objects to the given ObjSearch instance.

Unlike Obj#children, which returns an array, andIsChildOf returns an ObjSearch instance. This facilitates further search refinement, ordering and boosting.

If the parent Obj has no path or is not assigned to a specific site, i.e., its siteId is null, an empty search is returned.

Params

  • obj (Obj) – Parent content object.

Returns

ObjSearch

Example

Find the children of "/products":

Find those children of "/products" whose isActive attribute is set to true: