currentPage( )


Gets information about the current page or lightbox.

Method Declaration
Copy
function currentPage(): union;
Request
This method does not take any parameters
Returns
Return Type:union
JavaScript
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 * } */
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?