Unfortunately, the navbar isn't very flexible. However, it returns an HTML 
helper object (a SPAN with several components), so you can manipulate it 
after creation. The part after "Welcome" is the second component of the 
span, so:

navbar = auth.navbar()
if auth.user:
    navbar[1] = auth.user.email #replace first name with email
    del navbar[0] # remove "Welcome"

Anthony

On Friday, July 20, 2012 4:35:25 AM UTC-4, Matt Newton wrote:
>
> Is there a simple way to make changes to the auth.navbar() helper object?
>
> For example, the default for a logged in user is:
>
> "Welcome {First Name} 
> Logout<http://127.0.0.1:8000/main/default/user/logout?_next=/main/default/index>|
>  
> Profile<http://127.0.0.1:8000/main/default/user/profile?_next=/main/default/index>|
>  
> Password"<http://127.0.0.1:8000/main/default/user/change_password?_next=/main/default/index>
>
> I would like to change it to:
>
> '{Email} | Logout | Profile | Password
>
> but I'm not sure how to request the information I want when it's masked by 
> the helper object.
>
> Thanks for your help.
>

-- 



Reply via email to