Home > widget-integration > FilterService > initShortenMaps
FilterService.initShortenMaps() method
Initializes URL shorten maps from app configuration.
Loads shortened URL parameter mappings from app configuration and stores them in FilterStore. This allows using shorter query parameters in URLs for better SEO and readability (e.g., 'c' instead of 'pf_c_color').
Signature:
initShortenMaps(): void;
Returns:
void
Remarks
Should be called during app initialization before any filter operations. The shorten maps are used by URL helper to encode/decode parameters.
Example
Override to add custom URL shortening rules:
initShortenMaps() {
super.initShortenMaps();
// Add custom shop-specific URL shortenings
this.filterStore.addShortenMapping('custom_filter', 'cf');
}