Exemplo n.º 1
0
 def _root_child_is_content(self, container, child):
     if not IFinderRoot.providedBy(container):
         return False
     if AT_INSTALLED and IBaseContent.providedBy(child):
         return True
     if DX_INSTALLED and IDexterityContent.providedBy(child):
         return True
     return False
Exemplo n.º 2
0
 def rendered_columns(self, uid):
     ret = list()
     context = aq_inner(self.get(uid))
     while context is not None and not IFinderRoot.providedBy(context):
         ret.append(self._render(context))
         child = context
         context = aq_parent(context)
         if self._root_child_is_content(context, child):
             root = RootProvider(context)
             ret.append(root.render("plone_content", "finder_column"))
             ret.append(root.render("root", "finder_column"))
     ret.reverse()
     return ret