A
A
alestro2015-12-19 20:12:03
PHP
alestro, 2015-12-19 20:12:03

How to display a mega menu using nested sets?

There is a table in the database: id, name, left_key, right_key, level.
And so the tree. I pull out an array of objects with a request, but I can’t integrate it into the layout . The layout looks like this:SELECT * FROM my_tree ORDER BY left_key ASC

<div id="main-menu" class="col-sm-9 main-menu">
                    <nav class="navbar navbar-default">
                        <div class="container-fluid">
                            <div class="navbar-header">
                                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
                                    <i class="fa fa-bars"></i>
                                </button>
                                <a class="navbar-brand" href="#">MENU</a>
                            </div>
                            <div id="navbar" class="navbar-collapse collapse">
                                <ul class="nav navbar-nav">
              
        
                                    <li class="dropdown">
                                        <a href="category.html" class="dropdown-toggle" data-toggle="dropdown"></a>
                                        <ul class="dropdown-menu mega_dropdown" role="menu" style="width: 830px;">
                                            <li class="block-container col-sm-3">
                                                <ul class="block">
                                                    <li class="img_container">
                                                        <a href="#">
                                                            <img class="img-responsive" src="themes/KSHOP/data/men.png" alt="sport">
                                                        </a>
                                                    </li>
                                                   <li class="link_container group_header">
                                                        <a href="#"></a>
                                                    </li>
                                                    <li class="link_container"><a href="#"></a></li>
 												</ul>
                                            </li> 
                                        </ul>
                                    </li>
                                </ul>
                            </div><!--/.nav-collapse -->
                        </div>
                    </nav>
                </div>

Maybe someone can tell me how to do it correctly, in my case

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question