docs: def children(self):
          """ returns a list of dicts of items in the current context
          """
          items = []
          catalog = self.context.portal_catalog
          current_path = '/'.join(self.context.getPhysicalPath())
  
          sidebar_search = self.request.get('sidebar-search', None)
          if sidebar_search:
              st = '%s*' % sidebar_search  # XXX plone only allows * as postfix.
              # With solr we might want to do real substr
              results = catalog.searchResults(SearchableText=st,
                                              path=current_path)
          else:
              results = self.context.getFolderContents()
  
          for item in results:
              # Do some checks to set the right classes for icons and candy
              desc = (
                  item['Description']
                  and 'has-description'
                  or 'has-no-description'
              )
  
              content_type = TYPE_MAP.get(item['portal_type'], 'none')
  
              mime_type = ''  # XXX: will be needed later for grouping by mimetyp
              # typ can be user, folder, date and mime typish
              typ = 'folder'  # XXX: This needs to get dynamic later
              url = item.getURL()
  
              ptool = api.portal.get_tool('portal_properties')
              view_action_types = \
                  ptool.site_properties.typesUseViewActionInListings
  
              if content_type in FOLDERISH_TYPES:
                  dpi = (
                      "source: #workspace-documents; "
                      "target: #workspace-documents"
                  )
                  url = url + '/@@sidebar.default#workspace-documents'
                  content_type = 'group'
              else:
                  if item['portal_type'] in view_action_types:
                      url = "%s/view" % url
                  dpi = (
                      "target: #document-body; "
                      "source: #document-body; "
                      "history: record"
                  )
                  content_type = 'document'
  
              cls = 'item %s type-%s %s' % (content_type, typ, desc)
  
              items.append({
                  'id': item['getId'],
                  'cls': cls,
                  'title': item['Title'],
                  'description': item['Description'],
                  'url': url,
                  'type': TYPE_MAP.get(item['portal_type'], 'none'),
                  'mime-type': mime_type,
                  'dpi': dpi})
          return items