def homepage(module=None, *match, **attr):
 settings = current.deployment_settings
 all_modules = settings.modules
 layout = S3MainMenuDefaultLayout
 c = ([module] + list(match))
 if ('name' in attr):
  name = attr['name']
  attr.pop('name')
 else:
  if (module is None):
   module = 'default'
  if (module in all_modules):
   m = all_modules[module]
   name = m.name_nice
  else:
   name = module
 if ('f' in attr):
  f = attr['f']
  del attr['f']
 else:
  f = 'index'
 return layout(name, c=c, f=f, **attr)

def homepage ( module = None , * match , ** attr ) : settings = current . deployment_settings all_modules = settings . modules layout = S3MainMenuDefaultLayout c = ( [ module ] + list ( match ) ) if ( 'name' in attr ) : name = attr [ 'name' ] attr . pop ( 'name' ) else : if ( module is None ) : module = 'default' if ( module in all_modules ) : m = all_modules [ module ] name = m . name_nice else : name = module if ( 'f' in attr ) : f = attr [ 'f' ] del attr [ 'f' ] else : f = 'index' return layout ( name , c = c , f = f , ** attr )
shortcut for module homepage menu items using the mm layout .