Measurable Success «10 Checkpoints for Future-Proof Enterprise CMS» White Paper
Measurable Success - White Paper
New in 1.18.0

siteId()

Returns the site ID of the CMS object.

console.log(Scrivito.Obj.root().siteId());

In a multi-site environment, every CMS object is assigned to a site. The ID of this site is stored in the Obj instance and can be obtained using this instance method.

Returns

String | null – the ID of the site the CMS object is assigned to, or null if this is an all-sites (global) Obj.