jak <jtaclendo@...> writes:
>
> Rob_McC <mrmccormack <at> ...> writes:
>
> >
> >
> > Thanks for help guys.I think I must have added that to default.py at
some
> point, while trying to learn to cusomize a navbar
>
http://127.0.0.1:8000/admin/default/edit/welcome/controllers/default.pySorry
> for confusion.At any rate,I took Massimo's suggestion, and coded the
> navbar in html. I think I did it correctly,code and image below - The
> menu doesn't collapse on mobile, but there is no need since it is so
small.
> >
> > <!--- START nav --><div class="navbar navbar-inverse navbar-fixed-
top">
> <div class="navbar-inner"> <div class="container"> <a
class="brand"
> href="/"> MyExampleSite.com <sup>™</sup>
> </a> <div class="pull-right"> <ul
> class="nav"> {{if auth.is_logged_in():}} <li ><a
> href="{{=URL('user/profile')}}">| <span class="icon-user icon-
> white"></span> {{=auth.user.username}}</a></li>
> <li><a href="{{=URL('user/profile')}}">| <span class="icon-edit icon-
> white"></span> {{=T("Profile")}} </a></li>
> <li><a href="{{=URL('user/logout')}}">| <span class="icon-off icon-
> white"></span> {{=T("Log out")}}</a></li> {{else:}}
> <li><a href="{{=URL('user/login')}}" >{{=T("Sign
> in")}} </a></li> <li><a href="{{=URL('user/register')}}" >{{=T
> ("Register")}} </a></li> {{pass}} </ul>
> </div> </div> </div></div><!--- END nav -->
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
>
> Good day...
> Sorry but we are really new at with application...
> Basically there are only 2 of us making an app...
> and we are not really web application experts...
> First time making one...hope we can make it...
> Out of the box we choose web2py due to our very
> short deadline...
> Well so far so good as of now web2py makes it a lot easier than
others...:)
>
> My question:
> Regarding the code below...
> How can i add a dropdown submenu?
> Ive tried class="dropdown-submenu" in a UL tag but i cannot make it
dropdown
> within a certain link
>
> <!--- START nav -->
> <div class="navbar navbar-inverse navbar-fixed-top">
> <div class="navbar-inner">
> <div class="container">
> <a class="brand" href="/"> MyExampleSite.com
> <sup>™</sup> </a>
> <div class="pull-right">
> <ul class="nav">
> {{if auth.is_logged_in():}}
> <li ><a href="{{=URL('user/profile')}}">| <span class="icon-
user
> icon-white"></span> {{=auth.user.username}}</a></li>
> <li><a href="{{=URL('user/profile')}}">| <span class="icon-
edit
> icon-white"></span> {{=T("Profile")}} </a></li>
> <li><a href="{{=URL('user/logout')}}">| <span class="icon-off
> icon-white"></span> {{=T("Log out")}}</a></li>
> {{else:}}
> <li><a href="{{=URL('user/login')}}" >{{=T("Sign in")}}
> </a></li>
> <li><a href="{{=URL('user/register')}}" >{{=T("Register")}}
> </a></li>
> {{pass}}
> </ul>
> </div>
> </div>
> </div>
> </div>
> <!--- END nav -->
>
My friend got it hehehe...
thanks anyways...
Customize dropdown menu
Sample code:
{{if auth.is_logged_in():}}
<li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown"
href="#" rel="nofollow">Me</a>
<ul class="dropdown-menu">
<li class="dropdown"><a href="{{=URL('default','myprofile')}}"><span
class="icon-user"></span>{{=auth.user.first_name}}</a></li>
<li class="dropdown"><a href="{{=URL('user/profile')}}"><span class="icon-
pencil"></span>{{=T("Edit Profile")}}</a></li>
</ul>
</li>
<li><a href="{{=URL('user/logout')}}">| <span class="icon-off icon-
white"></span> {{=T("Log out")}}</a></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 [email protected].
For more options, visit https://groups.google.com/d/optout.