Test Enterprise-Class Web CMS Scrivito Free for 30 Days
Test Scrivito Free for 30 Days
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