Thanks, it works, and is better than changing gluon/tools.py#navbar
directly ;)
I additionally surrounded it with a {{if 'auth' in globals():}} ...
{{pass}}.

It would be indeed better to add a parameter to the navbar method to choose
which field to display (and first_name by default).

Cheers,

Thomas


On Fri, Dec 23, 2011 at 2:16 PM, Anthony <[email protected]> wrote:

> On Thursday, December 22, 2011 10:23:59 PM UTC-5, Thomas Dall'Agnese wrote:
>>
>> Hi there,
>>
>> Is there a way to change the field displayed in the "Welcome" block on
>> the top right without changing web2py source code?
>> I looked at the code and we can change the "Welcome" text by defining the
>> prefix="Howdy" or whatever you want to replace the default "Welcome", but
>> is there a way to change the fact that the First Name is displayed then?
>> For example displaying the Last Name or the Username?
>>
>
> Maybe we should make that more customizable. For now, maybe:
>
> {{auth.user.first_name = auth.user.last_name}}
> {{=auth.navbar()}}
>
> You may need to switch first_name back to its original value after that.
>
> Anthony
>

Reply via email to