Trying to create a custom navigation using menu.py intact. 

Leveraging from this link:

http://bootsnipp.com/snippets/featured/fancy-sidebar-navigation

I modified the layout.html as it comes from the welcome app to following. 
Result is a horrible looking navbar. Why?

 

  # using sidebars need to know what sidebar you want to use

    mc0 = 'col-md-12'

    mc1 = 'col-md-9'

    mc2 = 'col-md-6'

    left_sidebar_enabled = globals().get('left_sidebar_enabled', False)

    right_sidebar_enabled = globals().get('right_sidebar_enabled', False)

    middle_column = {0: mc0, 1: mc1, 2: mc2}[

    (left_sidebar_enabled and 1 or 0)+(right_sidebar_enabled and 1 or 0)]

    }}

      

      {{ response.files.append(URL('static','css/bootsnipp.css'))

    response.files.append(URL('static','css/bootsnipp.js'))}}

      

  </head>

  <body>

    <!--[if lt IE 8]><p class="browserupgrade">You are using an 
<strong>outdated</strong> browser. Please <a 
href="http://browsehappy.com/";>upgrade your browser</a> to improve your 
experience.</p><![endif]-->

    <div class="w2p_flash alert alert-dismissable">{{=response.flash or 
''}}</div>

    <!-- Navbar ======================================= -->

      

       <div id="wrapper">

        <div class="overlay"></div>

        <nav class="navbar navbar-inverse navbar-fixed-top" 
id="sidebar-wrapper" role="navigation">

            <ul class="nav sidebar-nav">

                <li class="sidebar-brand">

                             {{='auth' in globals() and 
auth.navbar('Welcome',mode='dropdown') or ''}}

                 </li> 

            </ul>

                           <div class="navbar-header">

                                   {{=response.logo or ''}}

                            </div>

          {{if response.menu:}}

          {{=MENU(response.menu, _class='nav 
navbar-nav',li_class='dropdown',ul_class='dropdown-menu')}}

          {{pass}}

        </nav>

     </div>

 

    <!-- Masthead ===================================== -->    

    {{block header}}

    {{end}}

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to