示例#1
0
def contentIsTracked(context):
    """ Check the whole tree until we hit INavigationRoot. When we find
        content that is tracked, return it. """
    while hasattr(context, 'aq_parent') and not INavigationRoot.providedBy(context):
        if IContentIsTracked.providedBy(context):
            return context
        context = context.aq_parent
    return None
示例#2
0
 def isdirectlytracked(self):
     """ Returns True if our context is directly tracked. """
     context = aq_inner(self.context)
     return IContentIsTracked.providedBy(context)