0

I'm building my Django website and I have questions about this process : dropdown-menu from BootStrap3.

I created dropdown-menu in my navbar and it works perfectly well. But, as I have some tabs, I would like to concatanate someone and get dropdown-menu inside an existing dropdown-menu.

I have already this kind of things :

enter image description here

With this kind of script (for example Fiches Individuelles tab) :

        <!-- Individual form tab -->
            {% if user.is_authenticated %}
            <li class = "dropdown">
                <a href = "accueil" class = "dropdown-toggle" data-toggle = "dropdown">
                    <span class="glyphicon glyphicon-baby-formula"></span> Fiches Individuelles
                <b class = "caret"></b>
                </a>
                <ul class = "dropdown-menu">
                    <li><a href = "{% url "home" %}"> Accueil des fiches individuelles </a></li>
                    <li><a href = "{% url "form" %}"> Création des fiches individuelles </a></li>
                    <li><a href = "{% url "searched" %}"> Consultation des fiches individuelles </a></li>
                    <li><a href = "{% url "edited" %}"> Edition des fiches individuelles </a></li>
                    <li><a href = "{% url "deleted" %}"> Suppression des fiches individuelles </a></li>
                </ul>
            </li>

And now it's a representation from what I want to get finally :

enter image description here

I want to get a dropdown-menu from an existing dropdown-menu.

I tried to write something :

            {% if user.is_authenticated %}
            <li class="dropdown">
                <a data-toggle="dropdown" class="dropdown-toggle" href="accueil">
                    <span class="glyphicon glyphicon-baby-formula"></span> Actes <b class="caret"></b>
                </a>
                <ul class="dropdown-menu">
                    <li class="dropdown-submenu">
                        <a tabindex="-1" href="#">Fiches individuelles</a>
                            <ul class="dropdown-menu">
                                <li><a tabindex="-1" href="{% url "home" %}">Accueil des fiches individuelles</a></li>
                            </ul>
                    </li>
            </li>

But none effects for the moment :/

Have you idea or advices in order to help me ?

Thank you

Community
  • 1
  • 1
Essex
  • 6,042
  • 11
  • 67
  • 139
  • Add the class `dropdown-submenu` to the li element and see if it works.... I'm not sure if it's still supported, but it was in bootstrap 2.3 – Resley Rodrigues Jan 25 '17 at 13:09
  • @ResleyRodrigues I tried to use submenu as my script try above. But doesn't work :/ – Essex Jan 25 '17 at 13:14
  • Possible duplicate of [Bootstrap 3 dropdown sub menu missing](http://stackoverflow.com/questions/18023493/bootstrap-3-dropdown-sub-menu-missing) – BENARD Patrick Jan 25 '17 at 13:17

0 Answers0