Logo Search packages:      
Sourcecode: zope-cmfplone version File versions

def zope-cmfplone-2.0.4::StatelessTree::NavigationTreeViewBuilder::__call__ (   self  ) 

return the data structure 

Definition at line 26 of file StatelessTree.py.

00026                       :
        """ return the data structure """
        context=self.getContext()

        navtree_properties=getToolByName(self, 'portal_properties').navtree_properties
        props=getattr(context,'navtree_properties', navtree_properties)
        #XXX The above is highly inefficient I believe

        for k, v in props.propertyItems():
            if getattr(self, k, None) is None:
                setattr(self, k, getattr(context, k, v))

        self.sortCriteria=[c for c in self.sortCriteria
                           if type(c) in (UnicodeType, StringType) and c.strip()]

        tb=StatelessTreeBuilder(context, topObject=self.tree_root,
          childFinder=self.childFinder, includeTop=self.includeTop,
          showFolderishSiblingsOnly=self.showFolderishSiblingsOnly,
          showFolderishChildrenOnly=self.showFolderishChildrenOnly,
          showNonFolderishObject=self.showNonFolderishObject,
          topLevel=self.topLevel, forceParentsInBatch=self.forceParentsInBatch,
          skipIndex_html=self.skipIndex_html,bottomLevel=self.bottomLevel,
          idsNotToList=getattr(self,'idsNotToList',[])
          )

        batchStart=None
        batchSize=self.batchSize
        if self.navBatchStart is None:
            batchStart=None
        else:
            batchStart=int(self.navBatchStart)

        #from where to start? is called automatically by the .pt
        res=tb.buildFlatMenuStructure( batchSize=batchSize,
                                       batchStart=batchStart )

        for r in res['list']:
            r['published'] = self.checkPublished(r['object'])

        return res

    # checks if an object is published respecting its
    # publishing dates
    # XXX I did not find this in the API but there
    # should be something like this....
    def checkPublished(self, o):


Generated by  Doxygen 1.6.0   Back to index