Overview about the node routing process and URL generation, with extension points

#Incoming direction: URL to NodeAddress

SiteDetection Middleware
(extension point)
SiteDetection Middlewa...
(extension point)
finding the NodeAggregateId
finding the NodeAgg...
current site
current content repository
current sitecurrent content repository
Text is not SVG - cannot display

This is usually simply triggered once per request, before the controller starts working.

#Multi-Site and Multiple Content Repository support via SiteDetectionMiddleware

The Dimension Resolving configuration might be site-specific, f.e. one site maps a subdomain to a different language; and another site which wants to use the UriPathSegment.

Additionally, we want to support using different content repositories for different sites, e.g. to have different NodeTypes configured, or differing dimension configuration.

Thus, the frontend routing needs the result of the site detection as input. Site detection is done before the routing; inside the SiteDetectionMiddleware.

Feel free to replace the Site Detection with your own custom Middleware (it's very little code).

The Site Detection is done at every request.

#Custom Dimension Resolving via DimensionResolverInterface

Especially the DimensionSpacePoint matching must be very extensible, because people might want to map domains, subdomains, URL slugs, ... to different dimensions; and maybe even handle every dimension individually.

This is why the EventSourcedFrontendNodeRoutePartHandler calls the DelegatingResolver, which calls potentially multiple DimensionResolverInterfaces.

See Configuring Dimension Resolving and Custom DimensionResolvers in PHP for details on how to customize the Dimension Resolving.

Because the Dimension Resolving runs inside the RoutePartHandler, this is all cached (via the Routing Cache).

#Reading the Uri Path Segment and finding the node

This is implemented in EventSourcedFrontendNodeRoutePartHandler, and is not extensible.

#Routing result

The result of the routing call is a NodeAddress, containing: