selectPageSettings$(): Observable<Record<string, string>>¶
The selectPageSettings$ method allows you to retrieve settings of a current page in the shop.
Returned value¶
A returned value has a type of Observable<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.selectPageSettings$();
pageSettings$.subscribe((pageSettings) => {
console.log('current page settings:', pageSettings);
});
});
Storefront Settings API methods reference¶
- getSkinSettings
- getPageSettings
- selectSkinSettings$
- selectPageSettings$
- selectFrontstoreApiUrl$
- getLocales
- selectLocales$
- getLocalesAndCurrenciesSettings
- selectLocalesAndCurrenciesSettings$
- getAllLocales
- selectAllLocales$
- getCurrencies
- selectCurrencies$
- getCountries
- selectCountries$
- getCountryById
- selectCountryById$
- getCountryByCode
- selectCountryByCode$