Just add a context handler that will add this variable to the context. Context processor - simple python function
def navbar(request):
return {'navbar_enabled': request.GET.get('nv', False)
and add it to the list of template context processors
TEMPLATE_CONTEXT_PROCESSORS = (
...
'MODULE_NAME.navbar',
...
)
source
share