def _make_menu_item(menu_item, title, **kw):
 _menu_items = config['routes.named_routes']
 if (menu_item not in _menu_items):
  raise Exception(('menu item `%s` cannot be found' % menu_item))
 item = copy.copy(_menu_items[menu_item])
 item.update(kw)
 active = _link_active(item)
 needed = item.pop('needed')
 for need in needed:
  if (need not in kw):
   raise Exception(('menu item `%s` need parameter `%s`' % (menu_item, need)))
 link = _link_to(title, menu_item, suppress_active_class=True, **item)
 if active:
  return ((literal('<li class="active">') + link) + literal('</li>'))
 return ((literal('<li>') + link) + literal('</li>'))

def _make_menu_item ( menu_item , title , ** kw ) : _menu_items = config [ 'routes.named_routes' ] if ( menu_item not in _menu_items ) : raise Exception ( ( 'menu item `%s` cannot be found' % menu_item ) ) item = copy . copy ( _menu_items [ menu_item ] ) item . update ( kw ) active = _link_active ( item ) needed = item . pop ( 'needed' ) for need in needed : if ( need not in kw ) : raise Exception ( ( 'menu item `%s` need parameter `%s`' % ( menu_item , need ) ) ) link = _link_to ( title , menu_item , suppress_active_class = True , ** item ) if active : return ( ( literal ( '<li class="active">' ) + link ) + literal ( '</li>' ) ) return ( ( literal ( '<li>' ) + link ) + literal ( '</li>' ) )
build a navigation item used for example breadcrumbs outputs <li><a href=" .