Thanks again, Anthony. Thank you for all of the time you dedicate.

On Friday, October 17, 2014 8:51:52 AM UTC-4, Anthony wrote:
>
> Note, when trying to manipulate HTML helpers, it can be very helpful to 
> jump into a web2py shell so you can quickly inspect objects and experiment 
> with manipulations.
>
> On Friday, October 17, 2014 8:49:14 AM UTC-4, Anthony wrote:
>>
>> The following code gets applied to the prefix:
>>
>>         if isinstance(prefix, str):
>>             prefix = T(prefix)
>>         if prefix:
>>             prefix = prefix.strip() + ' '
>>
>> So, you're probably limited to text. An alternative is to set prefix=None, 
>> and after creating the navbar, insert whatever element you want at the 
>> beginning (but only in the logged in case).
>>
>> navbar = auth.navbar(prefix=None)
>> navbar.insert(0, my_fontawesome_element)
>>
>> Another option is to do auth.navbar(mode='bare'), which returns a 
>> dictionary of items you can use to build your own custom navbar. You can 
>> look at the source code to get a better idea how it all works.
>>
>> Anthony
>>
>> On Thursday, October 16, 2014 10:26:55 PM UTC-4, LoveWeb2py wrote:
>>>
>>> One last thing, Anthony. Is it possible to make prefix equal a class? 
>>> I'd like to use font awesome as the prefix.
>>>
>>> On Thursday, October 16, 2014 10:02:16 PM UTC-4, LoveWeb2py wrote:
>>>>
>>>> Just realized it goes in layout.html... /slaps self with large trout
>>>>
>>>> lol
>>>>
>>>> Thanks, Anthony. You're the best!!
>>>>
>>>> On Thursday, October 16, 2014 9:56:54 PM UTC-4, LoveWeb2py wrote:
>>>>>
>>>>> Wow... awesome, Anthony. Thank you. I figured it was something easy. 
>>>>> Where should I put that exactly? I've tried putting it in db.py and 
>>>>> menu.py 
>>>>> and even my controller, but its not taking.
>>>>>
>>>>> On Thursday, October 16, 2014 9:49:10 PM UTC-4, Anthony wrote:
>>>>>>
>>>>>> auth.navbar(prefix='Howdy')
>>>>>>
>>>>>> Anthony
>>>>>>
>>>>>> On Thursday, October 16, 2014 8:26:29 PM UTC-4, LoveWeb2py wrote:
>>>>>>>
>>>>>>> Is it possible? I see the code in tools.py, but I don't see any 
>>>>>>> methods for the class. I guess I could do something like menu = 
>>>>>>> auth.navbar() and try to take it from there? I went through the book 
>>>>>>> and 
>>>>>>> didn't see anything so just want to know if I missed something.
>>>>>>>
>>>>>>

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

Reply via email to