Re: [web2py] Re: add items in navbar .. mode=dropdown

2017-04-10 Thread Richard Vézina
Nevermind, I have extract header of every layout I have anyway into header.html that I include back in each layout so, my app stay DRY. I am glad I had issue with selecting navbar jquery injected element that I can't select with selenium/splinter as it allow me to figure an new way to include my t

Re: [web2py] Re: add items in navbar .. mode=dropdown

2017-04-10 Thread Richard Vézina
Hello Anthony, Is there a way to manipulate auth.navbar content from model file somehow avoiding repeat this in every layout file I have? Thanks Richard On Sun, May 24, 2015 at 9:55 AM, Neeraj Shukla wrote: > Thanks Anthony... > > > On Sunday, 24 May 2015 03:16:00 UTC+5:30, Anthony wrote: >>

[web2py] Re: add items in navbar .. mode=dropdown

2015-05-24 Thread Neeraj Shukla
Thanks Anthony... On Sunday, 24 May 2015 03:16:00 UTC+5:30, Anthony wrote: > > Your code is incorrect. Instead of inserting the full navbar object, you > apply a string of methods to it and insert the return value of the final > method (which is None). As in the original code example, you must a

[web2py] Re: add items in navbar .. mode=dropdown

2015-05-23 Thread Anthony
Your code is incorrect. Instead of inserting the full navbar object, you apply a string of methods to it and insert the return value of the final method (which is None). As in the original code example, you must assign the navbar to a variable, then apply the manipulation, and finally insert th

[web2py] Re: add items in navbar .. mode=dropdown

2015-05-23 Thread Neeraj Shukla
Following code I used and it produces None in HTML markup {{=auth.navbar(mode='

[web2py] Re: add items in navbar .. mode=dropdown

2015-05-23 Thread Anthony
Hmm, seems to work for me. Can you show your exact code as well as the HTML markup that ends up in the browser? On Saturday, May 23, 2015 at 6:01:34 AM UTC-4, Neeraj Shukla wrote: > > > navbar = auth.navbar(mode='dropdown') > if auth.user: > navbar.element('ul.dropdown-menu').components.exten

[web2py] Re: add items in navbar .. mode=dropdown

2015-05-23 Thread Neeraj Shukla
navbar = auth.navbar(mode='dropdown') if auth.user: navbar.element('ul.dropdown-menu').components.extend([LI('Item 1'), LI('Item 2'), ...]) Above method is not working on web2py 2.10.4 however if jquery works {{block page_js}} {{if auth.user:}} jQuery("ul.dropdown-menu").append('
  • i

  • [web2py] Re: add items in navbar .. mode=dropdown

    2013-04-30 Thread Anthony
    The auth.navbar() produces an HTML helper DOM, so you can manipulate it as usual: navbar = auth.navbar(mode='dropdown') if auth.user: navbar.element('ul.dropdown-menu').components.extend([LI('Item 1'), LI('Item 2'), ...]) Anthony On Tuesday, April 30, 2013 11:22:56 AM UTC-4, ctrlSoft wrot

    [web2py] Re: add items in navbar .. mode=dropdown

    2013-04-30 Thread ctrlSoft
    by default i have, login, logout register, i wish i could append some links only if auth.user -- --- 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+