Learn how Scrivito CMS can help you deliver amazing digital experiences
See Scrivito CMS in action
New in 1.18.0

where(attribute, operator, value, boost)

Returns an ObjSearch with the given initial subquery based on the specified arguments. The search returns only CMS objects that are part of the site context.

frenchSite = Scrivito.Obj.onSite('fr'); search = frenchSite.where('title', 'contains', 'salut'); salutations = await Scrivito.load(() => search.take()); console.log(salutations.map((page) => page.get("title")));


  • attribute (String or Array<String>) - See ObjSearch for details.
  • operator (String) - See ObjSearch for details.
  • value (String, Date, Time, Number, Obj, or Array<String>) - See ObjSearch#and for details.
  • boost (optional) (Object) - See ObjSearch#and for details.


ObjSearch - An ObjSearch scoped to the site of the SiteContext.

See also