Hello Pierre, Simplify your code... Remove the if and try one side bar at a time first... You may find that they are not properly constructed... I mean, the code above seems fine... So I suspect that it is the way you construct your side bar that are causing your issue. There is maybe another issue, as I am not so familiar with web2py view "block" instruction... I suggest you reading here : http://web2py.com/books/default/chapter/29/05/the-views#Blocks-in-views
If your side bar are correct in there original view ("manager_sidebard" and "sidebar"), I would suspect that if inside block can't be properly treated for some reason... But you could probalby simplified your code and have only once sidebar view which already containt the proper side bar stuff as you only display one or the other base on user membership, you surely don't need 2 views for that if you move your if inside sidebar.html controller or view and filter things out there... Good luck Richard On Mon, Apr 24, 2017 at 9:49 AM, Pierre <theognis0...@gmail.com> wrote: > hello everyone, > > {{block left_sidebar}} > {{if auth.has_membership('manager'):}} > {{include 'manager_sidebar.html'}} > {{else:}} > {{include 'sidebar.html'}} > {{pass}} > {{end}} > > for some reason this doesn't work. It inserts a mixture of the two > sidebars. If i move blocks inside of the if same problem....?? there seems > to be a conflict between the two includes ? > > -- > 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. > -- 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.