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

all()

Returns an ObjSearch of all CMS objects assigned to the site context.

siteSearch = Scrivito.Obj.onSite('fr').all(); objCount = await Scrivito.load(() => siteSearch.count()); console.log('Number of objs on site "fr"', objCount);

Returns

An ObjSearch that includes all Objs.

See also

Obj.all

Examples

Show the 'title' attribute value of all homepages of all sites.

Homepage = Scrivito.Obj.getClass("Homepage"); objs = await Scrivito.load(() => Homepage.onAllSites().all().take()); for (var obj of objs) {   console.log("Homepage of", obj.siteId(), "has title", obj.get("title")); }