Returns the site ID determined by the Scrivito-based application.

If the Scrivito CMS has the multi-site feature enabled, the Scrivito application derives the current site from the browser’s URL (based on the siteForUrl callback). During pre-rendering, the page being pre-rendered determines the current site. currentSiteId returns the ID of this site.


String or null – the current site ID, or null if there is no current page.


Requires a loading context, i.e. load or connect.