code: def folderitem(self, obj, item, index):
          
  
          obj = obj.getObject()
          # Group items by RefSample - Worksheet - Position
          ws = obj.getWorksheet()
          wsid = ws and ws.id or ''
          wshref = ws.absolute_url() or None
          if wshref:
              item['replace']['Worksheet'] = "<a href='%s'>%s</a>" % (
                  wshref, wsid)
  
          imgtype = ""
          if obj.portal_type == 'ReferenceAnalysis':
              antype = QCANALYSIS_TYPES.getValue(obj.getReferenceType())
              if obj.getReferenceType() == 'c':
                  imgtype = "<img title='%s' " \
                            "src='%s/++resource++bika.lims.images/control.png" \
                            "'/>&nbsp;" % (
                                antype, self.context.absolute_url())
              if obj.getReferenceType() == 'b':
                  imgtype = "<img title='%s' " \
                            "src='%s/++resource++bika.lims.images/blank.png" \
                            "'/>&nbsp;" % (
                                antype, self.context.absolute_url())
              item['replace']['Partition'] = "<a href='%s'>%s</a>" % (
                  obj.aq_parent.absolute_url(), obj.aq_parent.id)
          elif obj.portal_type == 'DuplicateAnalysis':
              antype = QCANALYSIS_TYPES.getValue('d')
              imgtype = "<img title='%s' " \
                        "src='%s/++resource++bika.lims.images/duplicate.png" \
                        "'/>&nbsp;" % (
                            antype, self.context.absolute_url())
              item['sortcode'] = '%s_%s' % (obj.getRequestID(), obj.getKeyword())
  
          item['before']['Service'] = imgtype
          item['sortcode'] = '%s_%s' % (obj.getReferenceAnalysesGroupID(),
                                        obj.getKeyword())
          return item
docs: Prepare a data item for the listing.
  
          :param obj: The catalog brain or content object
          :param item: Listing item (dictionary)
          :param index: Index of the listing item
          :returns: Augmented listing data item