@contextfunction
def modules_active(context):
 request = context['request']
 (modules, active) = _get_modules(request)
 if active:
  return active.name.replace('.', '-')
 return 'treeio-home'

@ contextfunction def modules_active ( context ) : request = context [ 'request' ] ( modules , active ) = _get_modules ( request ) if active : return active . name . replace ( '.' , '-' ) return 'treeio-home'
active modules .