Document Properties
Kbid
29B388
Last Modified
22-Apr-2020
Added to KB
29-Apr-2020
Public Access
Everyone
Status
Online
Doc Type
Concepts
Product
Intershop Progressive Web App
Concept - Intershop Progressive Web App - URL Rewriting

The PWA allows to supply localized and SEO optimized URLs for categories and product detail pages.

Rewriting Concept

This feature is mainly built on top of Angular's UrlMatcher for parsing routes and a custom pipe for generating them.

Rewriting Artifacts

Artifacts for custom routes are accumulated in src/app/core/routing.

matchXRoute

Each route must supply an implementation of UrlMatcher to be used in the routing module.
We recommend defining custom routes in src/app/pages/app-last-routing.module.ts, so they do not interfere with other routes.
The easiest approach for implementation would be to build on top of UrlSegment, but it is also possible to implement a custom solution with regular expressions.

XRoutePipe

It is also important to generate the customized routes depending on entities or other configuration.
It is helpful to implement an exported generateXRoute helper function, that transforms said entity to a URL.

ofXRoute (optional)

To detect routes in NgRx Effects, we recommend to also supply an operator, that filters for URLs of customized routes using the RouteNavigation as an input.

Disclaimer
The information provided in the Knowledge Base may not be applicable to all systems and situations. Intershop Communications will not be liable to any party for any direct or indirect damages resulting from the use of the Customer Support section of the Intershop Corporate Web site, including, without limitation, any lost profits, business interruption, loss of programs or other data on your information handling system.
The Intershop Knowledge Portal uses only technically necessary cookies. We do not track visitors or have visitors tracked by 3rd parties. Please find further information on privacy in the Intershop Privacy Policy and Legal Notice.
Home
Knowledge Base
Product Releases
Log on to continue
This Knowledge Base document is reserved for registered customers.
Log on with your Intershop Entra ID to continue.
Write an email to supportadmin@intershop.de if you experience login issues,
or if you want to register as customer.