Score:0

Custom menu that handles content type creation

cz flag

I'm a Drupal 9 newbie, and right now I'm on steep side of the learning curve. I apologize if my question is a bit messy and long. Please bear with me.

I'm on Drupal 9.4.8 with a Bootstap 5 theme.

I'm planning on making a custom dynamic menu in a department page that handles additional content ( hope that makes sense... )

I have a dynamic department page which is created via my DepartmentsController showSingle(department_id) function, which again passes all relevant backend data to my show-single-department.html.twig, and that works perfectly. I can access every single department page with /department/{department_id}.

Here's what I'm thinking:

  • On each of my department pages, I need a menu UI which can handle additional content.(create, delete, edit, reorder etc.)

  • This menu should have no more than three levels:

    • Parent department_document
      • Child department_document
        • Grandchild department_document
  • For the additional content, I'll create a simple department_document content type with a title field and a body field.

  • On each of my department pages, I'll have the menu on the left side, and the additional content to the right.

  • The department_document content on the right side should be shown in the same order as in the menu.

  • When the user clicks on a menu link, the content part scrolls down to the relevant department_document using anchor elements or JS.

I've been googling a solution for a while now, but that only made me more confused. I found the Inline Entity Form Module, but it seems to only handle the document structure.

Can anyone please point me in the right direction, or am I on the wrong track here?

cn flag
It seems there are some hidden requirements here. What does " which needs to be shown one after another"? And at the end " parent, child and grandchild department_documents"-- what is this hierarchy requirement? It seems like everything else is pretty standard and can easily be handled.
FrankDK avatar
cz flag
Hi @PatrickKenny I can see what you mean, sorry about that. I've edited my question, so I hope I make more sense now
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.