Closed (fixed)
Project:
DruxtJS
Version:
1.2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
12 Oct 2022 at 22:17 UTC
Updated:
19 Aug 2025 at 02:04 UTC
Jump to comment: Most recent
As a frontend developer I want to be able to resolve all types of routes from Drupal, not just entity routes.
1. Setup a site with Druxt / Decoupled Router
2. Access /router/translate-path?path=/user/login
Make a fallback/wildcard/catchall path translator service that returns data pertaining to the route.
{
resolved: "https://8080-realityloop-starterkitd-tqhtzkxmv10.ws-us70.gitpod.io/user/login",
isHomePath: true,
label: "Log in",
context: {
_form: "\Drupal\user\Form\UserLoginForm",
_title: "Log in",
_route: "user.login",
_route_object: { },
_raw_variables: { },
_controller: "controller.form:getContentResult"
}
}Create a WildcardPathTranslatorSubscriber service that provides the $match_info object as context for a frontend client to consume as required.
N/A
Add context attribute to results.
Add context attribute to results.
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
decipheredComment #4
decipheredComment #6
realityloop commentedUpdated due to https://www.drupal.org/project/druxt/issues/3418785
Comment #7
realityloop commentedComment #9
realityloop commented