code: def render_default(path, cp):
      
  
      # define filename and slug from path
      filename = os.path.basename(path)
      slug = filename.replace('.', '_')
  
      # initializations
      content = None
  
      if path.endswith('.xml') or path.endswith('.xml.gz'):
          # segment or veto file return a segmentslistdict instance
          try:
              wf_file = SegFile.from_segment_xml(path)
              # FIXME: This is a dictionary, but the code wants a segmentlist
              #        for now I just coalesce.
              wf_file.return_union_seglist()
          except Exception as e:
              print('No segment table found in %s : %s' % (path, e))
  
      # render template
      template_dir = pycbc.results.__path__[0] + '/templates/files'
      env = Environment(loader=FileSystemLoader(template_dir))
      env.globals.update(abs=abs)
      env.globals.update(open=open)
      env.globals.update(path_exists=os.path.exists)
      template = env.get_template('file_default.html')
      context = {'path'     : path,
                 'filename' : filename,
                 'slug'     : slug,
                 'cp'       : cp,
                 'content'  : content}
      output = template.render(context)
  
      return output
docs: This is the default function that will render a template to a string of HTML. The
      string will be for a drop-down tab that contains a link to the file.
  
      If the file extension requires information to be read, then that is passed to the
      content variable (eg. a segmentlistdict).