def UpdateFulltext(self, **kw): """ Update fulltext for entry. Text is generated automatically. """ if not self.app.configuration.fulltextIndex: return if IPage.providedBy(self): # get text from contained elements text = [self.GetTexts()] for e in self.GetPageElements(addBoxContents=1, addColumnContents=1): text.append(e.GetTexts()) self.dbEntry.WriteFulltext(self.FormatFulltext(text)) elif IPage.providedBy(self) or IRoot.providedBy(self): # get text from contained elements text = [] for e in self.GetPageElements(addBoxContents=1, addColumnContents=1): text.append(e.GetTexts()) #!fulltext storage root #self.dbEntry.WriteFulltext(self.FormatFulltext(text)) else: self.GetPage().UpdateFulltext()
def CanCopy(self): """ """ if IRoot.providedBy(self): return False return not hasattr(self, "disableCopy") or not self.disableCopy
def IsPage(self): """ returns if the element is a column """ return IPage.providedBy(self) or IRoot.providedBy(self)