def set_route(context):
 if context.web_form_name:
  context.route = u'{0}?name={1}'.format(context.pathname, quoted(context.doc.name))
 elif (context.doc and getattr(context.doc, u'route', None)):
  context.route = context.doc.route
 else:
  context.route = u'{0}/{1}'.format((context.pathname or quoted(context.doc.doctype)), quoted(context.doc.name))

def set_route ( context ) : if context . web_form_name : context . route = u'{0}?name={1}' . format ( context . pathname , quoted ( context . doc . name ) ) elif ( context . doc and getattr ( context . doc , u'route' , None ) ) : context . route = context . doc . route else : context . route = u'{0}/{1}' . format ( ( context . pathname or quoted ( context . doc . doctype ) ) , quoted ( context . doc . name ) )
set link for the list item .