You can add some logic in the layout.html, if I understand correctly you 
want to disable the navbar in some views?
{{if not 'navbar_disable' in globals():}}
    <ul id="navbar" class="nav pull-right">{{='auth' in globals() and 
auth.navbar(mode="dropdown") or ''}}</ul>
{{pass}}
and then pass navbar_disable in the controller. 
return dict(message=T('Hello World'), navbar_disable=True) #True or False 
does not matter, only if navbar_disable exists


On Thursday, August 29, 2013 4:19:04 PM UTC+2, Federico Ferraro wrote:
>
> How to disable auth.navbar for some funtions ? 
>
> - I need to create a different layout.
> Tried to create a function in the model:
>     
>     navbar_disable = False
>     onavbar = auth.navbar
>     def nav_bar(**kargs):
>           if navbar_disable:
>              return False
>           else:
>              return onavbar(**kargs)
>                  
>    auth.navbar =  nav_bar
>
> In the controler : 
>
>     navbar_disable = True 
>    
>
> But it did not work ... 
>
>
> -- 
> --
> Federico Ferraro
> Usuario Linux : 482533.
> -- 
>

-- 

--- 
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/groups/opt_out.

Reply via email to