On Tuesday, August 18, 2020 at 3:48:51 PM UTC-7, AGRogers wrote:
>
> I'm pretty sure that bootstrap doesn't allow nesting menus more than a 
> single level. If you need more you need to use a custom menu system.
>
> I'm not sure how that applies to web2py's menu system. But I suspect it 
> too only accommodates a single level by design. 
>

It was engineered to support multiple levels, but that was before the 
Bootstrap people changed their code.  I think the change happened going 
from 3->4,

/dps
 

>
> On Wed, 19 Aug 2020, 7:24 am Vlad, <westga...@gmail.com <javascript:>> 
> wrote:
>
>> I may be missing something, but it seems to me that by design MENU helper 
>> produces regular, simple menu code, as it's not bootstrap-enabled by 
>> itself. I mean, this was my assumption to begin with; that's why I haven't 
>> even tried it - rather setting up menu as a list  of items  (i.e. data 
>> structure to be used in menu, which by default belongs to menu.py) and in 
>> layout.html I create an explicit bootstrap menu, iterating over the list, 
>> using appropriate html code, and this is how I use it. 
>>
>> On Tuesday, August 18, 2020 at 4:55:06 AM UTC-4 Annet wrote:
>>
>>> Hi,
>>>
>>> I've got a two level menu, however, calling 
>>>
>>> {{=MENU(response.app_menu)}}
>>>
>>> doesn't render a Bootstrap 4 menu like your resulting html code. It
>>> renders something pretty ugly:
>>>
>>> <div class="collapse navbar-collapse flex-row-reverse" id="navbarNav">
>>>   <ul class="nav navbar-nav navbar-right navbar-right-app-menu">
>>>     <li class="web2py-menu-first"><a onclick=""><span class="nav-link"><
>>> i class="fas fa-home"></i></span></a></li>
>>>     <li class="dropdown"><a href="#"><span class="nav-link"><i class="fas 
>>> fa-exchange-alt"></i></span></a>
>>>     <ul class="dropdown-menu">
>>>       <li><a onclick=")">Our network</a></li>
>>>       <li><a onclick="">Networks we joined</a></li>
>>>      </ul>
>>>    </li>
>>>   </ul>
>>> </div> <!-- /.collapse -->
>>>
>>>
>>> Do you have any idea how to solve this issue?
>>>
>>> Kind regards,
>>>
>>> Annet
>>>
>>> Op vrijdag 17 juli 2020 om 16:33:16 UTC+2 schreef Vlad:
>>>
>>>> Missing something basic, but seems to me that the following code should 
>>>> result in nested menu:
>>>>
>>>> response.menu = [['One', False, 'link1',
>>>>                   [
>>>>                     ['Two', False, None,
>>>>                        ['Three', False, 'link3']
>>>>                     ]
>>>>                   ]
>>>>                  ]
>>>>                 ]
>>>>
>>>> "One" menu items contains "two", as it should, but "two" comes out to 
>>>> be a simple menu item, not containing "three" in it. What's missing?? How 
>>>> do I make nested sub-menu items? 
>>>>
>>>> Here is the resulting html, where "three" sub-item is not even present: 
>>>>
>>>> <li class="nav-item dropdown">
>>>>  <a class="nav-link dropdown-toggle" href="link1" data-toggle=
>>>> "dropdown">One</a>
>>>>  <div class="dropdown-menu">
>>>>   <a class="dropdown-item"  href="None">Two</a>
>>>>  </div>
>>>> </li>
>>>>
>>>>
>>>>
>>>>
>>>> -- 
>> Resources:
>> - http://web2py.com
>> - http://web2py.com/book (Documentation)
>> - http://github.com/web2py/web2py (Source code)
>> - https://code.google.com/p/web2py/issues/list (Report Issues)
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "web2py-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to web...@googlegroups.com <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/web2py/ac140d58-8f06-4455-b4e0-b9dd9fd028a0n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/web2py/ac140d58-8f06-4455-b4e0-b9dd9fd028a0n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/253b4f88-bc1d-4c86-a877-f14602ebcac9o%40googlegroups.com.

Reply via email to