Closed (outdated)
Project:
Drupal core
Version:
11.x-dev
Component:
jsonapi.module
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
24 May 2016 at 15:46 UTC
Updated:
29 Jun 2024 at 19:27 UTC
Jump to comment: Most recent
Comments
Comment #2
wim leersComment #3
wim leersComment #4
dawehnerAgreed that this is useful. I'm wondering whether we should expose the tree structure or flatten it and let the client deal with the hierarchy.
On top of that I'm wondering whether there are best practises around exposing hierarchical structures in general.
Comment #5
wim leers#4: great questions!
Comment #6
GrandmaGlassesRopeManComment #7
GrandmaGlassesRopeManI think exposing the tree structure makes the most sense, it puts the effort of reconstruction on the client, and we also aren't forcing something on them. Possibly something like the following?
Comment #10
wim leersApparently there is a contrib module that provides this: https://www.drupal.org/project/rest_menu_tree.
Comment #11
wim leersAnd there's also https://www.drupal.org/project/rest_menu_items, which appears to be more popular and more complete.
Since there are 2 options in contrib, marking this as postponed. It's probably better to let this mature in contrib first.
Comment #16
wim leersFocus has shifted to
jsonapi.moduleinstead ofrest.module, so changing component.Comment #25
bbralaI think this is out of date, preferred way to get menus would be: https://www.drupal.org/docs/develop/decoupled-drupal/decoupled-menus/dec... :)