Re: [web2py] conditional block insert

2017-04-24 Thread Anthony
On Monday, April 24, 2017 at 10:27:55 AM UTC-4, Áureo Dias Neto wrote: > > is all python code, you can use one '{{' at the begin of code and '}}' at > end > > {{block left_sidebar > if auth.has_membership('manager'): > include 'manager_sidebar.html' > else: >include 'sidebar.html' > pass >

Re: [web2py] conditional block insert

2017-04-24 Thread Áureo Dias Neto
is all python code, you can use one '{{' at the begin of code and '}}' at end {{block left_sidebar if auth.has_membership('manager'): include 'manager_sidebar.html' else: include 'sidebar.html' pass end}} -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

Re: [web2py] conditional block insert

2017-04-24 Thread Richard Vézina
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

[web2py] conditional block insert

2017-04-24 Thread Pierre
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