Project Proposal: More flexible Node routing

I believe your approach is currently the best way to do this unfortunately, extending the existing handler and hook in your functionality:

class FrontendNodeRoutePartHandler extends FrontendNodeRoutePartHandler
{
     protected function matchValue($requestPath) {
          // your custom logic to turn "foo" into "/sites/mysitecom/some/path@user-xyz"
          else return parent::matchValue($requestPath);
     }

     protected function resolveValue($node) {
          // your custom logic to turn "/sites/mysitecom/some/path@user-xyz" or <SomeNode> into "foo"
          else return parent::resolveValue($requestPath);
     }
}

Christian is currently working on centralizing the logic of the handler. Afterwards it’s hopefully only a very slim facade that won’t need any extension (thus making the FrontendNodeRoutePartHandlerInterface obsolete). Instead the part that converts nodes and request paths might get some configuration options or ways to hook-in your custom logic more easily.

Right! I forgot to mention that one, but it’s mainly what I meant by “dimensions could even be determined completely independently from the request path”.
But support for domains is a long requested feature and sometimes™ we will get around implementing it. See Flow Routes Domain/Subdomain for more on this

2 Likes