1. Well , how saw on "layout.html" file , he use the auth object:

https://github.com/web2py/web2py/blob/master/applications/welcome/views/layout.html#L64

2. Then the auth object shoud be a method call of "navbar" that likely to 
define this behavior.

3. Then I searched by auth object on source code of web2py I found this 
method.

https://github.com/web2py/web2py/blob/master/gluon/tools.py#L2013-L2084

4. Which is responsable by define name after "Welcome" word. You see 
user_identifier parameter that define the form that represent user:

https://github.com/web2py/web2py/blob/master/gluon/tools.py#L2060-L2069

5. Do then shoud alter, I think .. the first elif with params of user 
object ( first_name , last_name ) etc..

string_representation = "%(first_name)s %(last_name)"

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

Try so..


Em quinta-feira, 29 de setembro de 2016 23:02:00 UTC-3, 黄祥 escreveu:
>
> in web2py default scaffolding app (welcome app), when user logged in in 
> top right there is auth.navbar that said : 'Welcome 
> user_logged_in_first_name'
> is it possible to change it? 
> e.g. 
> 'Welcome user_logged_in_first_name user_logged_in_last_name' 
> or 
> 'Welcome user_logged_in_user_name'
>
> i've checked in views/layout.html only found this, got no idea how to 
> change it, any thought how to change it?
> {{='auth' in globals() and auth.navbar('Welcome',mode='dropdown') or ''}}
>
> thanks and best regards,
> stifan
>

-- 
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