Skip to content

getPageSettings(): Record<string, string>

The getPageSettings method allows you to retrieve settings of a current page in the shop.

Returned value

A returned value has a type of Record<string, string>.

Example

In this example we make a StorefrontSettingsApi call to retrieve settings of a current page in the shop.

    useStorefront(async (storefront) => {
        const storefrontSettingsApi = storefront.getApiSync('StorefrontSettingsApi');

        const pageSettings = storefrontSettingsApi.getPageSettings();

        console.log('current page settings:', pageSettings);
    });

Storefront Settings API methods reference