scrivito
Version:
Scrivito is a professional, yet easy to use SaaS Enterprise Content Management Service, built for digital agencies and medium to large businesses. It is completely maintenance-free, cost-effective, and has unprecedented performance and security.
17 lines (13 loc) • 376 B
text/typescript
// @rewire
type SiteIdHandler = () => string | null;
let siteIdHandler: SiteIdHandler;
/** returns the id of the current site.
* `null` indicates "site not found".
* Needs loading context.
*/
export function currentSiteId(): string | null {
return siteIdHandler();
}
export function setCurrentSiteIdHandler(handler: SiteIdHandler): void {
siteIdHandler = handler;
}