Would it make sense to implement two twig functions than can be used to build a url given a path instead of a route name? See also https://github.com/slimphp/Slim/issues/2837