response.menu=[]
if not auth.user:
response.menu.append([T('Login'), False,
URL(request.application,'default','user'), []])
else:
response.menu.append([T('Logout'), False,
URL(request.application,'default','user/logout'), []])
On Aug 9, 9:04 am, Johann Spies <[email protected]> wrote:
> I see Cube2py does it but I can' t figure out how.
>
> I have the following in my menu:
>
> [T('Login'), False,
> URL(request.application,'default','user'), []],
> [T('Logout'), False,
> URL(request.application,'default','user/logout'), []],
>
> I want only 'Login' or ' Logout' to be visible depending on whether
> somebody is logged in or not.
>
> How do I do it?
>
> Regards
> Johann
>
> --
> "Be not deceived; God is not mocked: for whatsoever a
> man soweth, that shall he also reap."
> Galatians 6:7