I'm working on a Decoupled Router powered frontend using a router module I wrote for Nuxt (Druxt Router).

Any route entered into the Nuxt application will hit the Decoupled router and return information about the route and an entity if resolved. The router then passes through to a render system.

What I would like is the ability for a router, be it Decoupled router or Entity router, to resolve a Views path using this module.

I'd be happy to discuss this further in Slack. My username is Deciphered, my timezone is AEST.

Comments

Deciphered created an issue. See original summary.

deciphered’s picture

The attached patch adds a proof of concept PathTranslatorSubscriber to allow router resolution from View route through to JSON:API Views route.

An example result from: http://localhost/router/translate-path?path=admin/content

{
  "resolved":"http:\/\/localhost\/api\/views\/content\/page_1",
  "isHomePath":false,
  "view":{
    "view_id":"content",
    "display_id":"page_1"
  }
}

I will likely make future changes to the patch, or ideally fork the repo on Github, once I am able to start prototyping the frontend.

deciphered’s picture

StatusFileSize
new3.84 KB
new2.01 KB

Updated the patch with more data and a slightly different structure.

Not certain on what the exact data structure should be though.

deciphered’s picture

Status: Active » Closed (duplicate)

Closing in favour of #3144602

tebb’s picture

... which is a decoupled router issue :)

Here: https://www.drupal.org/project/decoupled_router/issues/3144602