The goal is to provide a dynamic (wildcard) route that should match on all nested routes that starts from some string.
The main issue is that Drupal routing system, does not provide a clean way to describe a wildcard routes that should match some kind of pattern, like /UserGuide
, /UserGuide/Development_Notes
or /UserGuide/Release_Notes/3.0.x
etc.
Initial idea is to use dynamic routes, that will work in case when routes are known or could be generated by some pattern, like /UserGuide/node/1
, /UserGuide/node/2
etc. Otherwise this is not possible, like when the route could consist from the multiple undefined parts.
As one possible solution, I decided to try the inbound path processor to catch destination path to redirect to the page controller, and pass an origin