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.
11 lines (9 loc) • 329 B
text/typescript
// @rewire
import { getCurrentNavigationState } from 'scrivito_sdk/app_support/navigation_state';
import { loadableWithDefault } from 'scrivito_sdk/loadable';
export function getCurrentPageId(): string | undefined {
return loadableWithDefault(
undefined,
() => getCurrentNavigationState()?.locationRoute?.objId
);
}