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
>
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)
-
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
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
4 matches
Mail list logo