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

def zope-coreblog-1.0::COREBlog::COREBlog::rev_category_entry_items (   self,
  category_id,
  start = 0,
  count = -1,
  consider_moderation = 1 
)

Return list of Entry(chronological order).

Definition at line 886 of file COREBlog.py.

00886                                                                                            :
        """Return list of Entry(chronological order)."""
      category_id = r2i(category_id)
      start = r2i(start,0)
      count = r2i(count,1)
      consider_moderation = r2i(consider_moderation,1)
        l = []
        try:
            int_cat = int(category_id)
        except:
            return []
        list_c = len(self.entry_list)
        if count == -1:
            count = list_c
        for c in range(start,start+count):
            if list_c <= c:
                #index out of range
                break
            id = self.entry_list[c]
            obj = self.getEntry(id)
            if obj.category and obj.category[0] == int_cat:
                if not consider_moderation or obj.moderated:
                    l.append(obj)
        return l


    security.declareProtected(View, 'category_entry_items')
    def category_entry_items(self,category_id,start=0,count=-1,consider_moderation = 1):


Generated by  Doxygen 1.6.0   Back to index