def getCollageContext(self, context): # import pdb; pdb.set_trace() if ICollageRow.providedBy(context) or ICollageColumn.providedBy(context): return self.getCollageContext(context.aq_parent) if ICollage.providedBy(context): return context else: return self.context
def getCollageContext(self, context): # import pdb; pdb.set_trace() if ICollageRow.providedBy(context) or ICollageColumn.providedBy( context): return self.getCollageContext(context.aq_parent) if ICollage.providedBy(context): return context else: return self.context
def aggregateSearchableText(self): """Append references' searchable fields.""" data = super(LayoutContainer, self).SearchableText() # Must we add subcontents texts? if ICollageColumn.providedBy(self): helper = self.restrictedTraverse('@@collage_helper') collage = helper.getCollageObject() if not collage.mustIndexSubobjects(): return data data = [data] for child in self.contentValues(): data.append(child.SearchableText()) data = ' '.join(data) return data