Gets information about the current page or lightbox.
function currentPage(): union;
import { createClient } from "@wix/sdk";
import { site } from "@wix/site";
import { site as wixSite } from "@wix/site-site";
const wixClient = createClient({
host: site.host(),
modules: { wixSite },
});
// ...
const currentPage = await wixClient.wixSite.currentPage();
/*
* {
* "name": "Home",
* "type": "static",
* "url": "/home",
* "isHomePage": true
* }
*/
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.