N
N
Nikita Kolesnikov2019-04-09 14:16:13
PHP
Nikita Kolesnikov, 2019-04-09 14:16:13

Layered twig menu with item data stored in database?

Hi!
I'm making a menu for a website.
The menu element can be a link or a button with a drop-down menu, which can contain links and other menu levels.
Each element must be stored in a database table, and when the page is loaded, all elements are retrieved and a menu is formed.

Example of table entries and result...
Hb7rc0Owk7o.jpgXt6f3IefLFk.jpg

Question: how to properly process such a menu with twig and in what form to send data to it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DevMan, 2019-04-09
@NikitOS_MV

https://twigfiddle.com/r5frag

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question