1

I have this kind of menu set up in my Drupal 8 project.

Level 1 item A1
    Level 2 item A2
    Level 2 item B2
    Level 2 item P2
    Level 2 item Q2
Level 1 item B1
    Level 2 item D2
    Level 2 item E2
Level 1 item C1
    Level 2 item Z2
    Level 2 item X2

Is there any way to create a page containing all the submenu links on a page. The desired result would be:

  1. Click on "A1" menu link
  2. Display a page containing A2, B2, P2 and Q2 in a list(the direct children of A1)

I've tried setting this up using views, the problem with that is i don't find a way to filter based on the parent menu item. Only the type of the node and therefor it shows all my content.

Is it possible to use views to achieve this, or is there a better way?

  • The menu system in Drupal 8 now includes some features from Menu Block and you can expand a parent to include the entire menu tree. I've tested that and it works great. That being said, I think I don't really understand your question or your logic. This question might help too: drupal.stackexchange.com/q/193610/697 – Danny Englander Mar 25 '16 at 15:39
0

I'm trying to solve the same problem and one part of a possible solution would be to assign every linked page (A2, B2, etc.) to taxonomy terms based on the menu structure. This way you can get a list of all items linked under A1. The problem is to bring it in the same order as the menu links...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.