from Products.ATContentTypes.content import schemata from kaab.blogcontent import blogcontentMessageFactory as _ from kaab.blogcontent.interfaces import IBlogEntry from kaab.blogcontent.interfaces import IImageProvider from kaab.blogcontent.config import PROJECTNAME BlogEntrySchema = schemata.ATContentTypeSchema.copy() + atapi.Schema(( # -*- Your Archetypes field definitions here ... -*- atapi.LinesField( name='theme', searchable=True, widget=atapi.KeywordWidget( label=_(u'Theme'), description=_(u'Select or enter the main theme of this entry.') ) ), atapi.TextField( name='text', searchable=True, allowable_content_types=('text/html',), default_output_type='text/x-html-safe', widget=atapi.RichWidget( label=_(u"Text"), description=_(u"Enter the main body text of this blog entry"), allow_file_upload=False, rows=25,
def title(self): """This property is used to give the title of the portlet in the "manage portlets" screen. """ return _(u"Themes")
from kaab.blogcontent import blogcontentMessageFactory as _ from kaab.blogcontent.interfaces import IBlogFolder from kaab.blogcontent.config import PROJECTNAME BlogFolderSchema = folder.ATFolderSchema.copy() + atapi.Schema(( # -*- Your Archetypes field definitions here ... -*- atapi.TextField( name="text", searchable=True, required=False, default_output_type='text/x-html-safe', validators=('isTidyHtmlWithCleanup'), widget=atapi.RichWidget( label=_(u"Text"), description=_(u"Enter optional introduction that will be listed " u"above the content listing."), allow_file_upload=False, rows=15, ) ), )) # Set storage on fields copied from ATFolderSchema, making sure # they work well with the python bridge properties. BlogFolderSchema['title'].storage = atapi.AnnotationStorage() BlogFolderSchema['description'].storage = atapi.AnnotationStorage() BlogFolderSchema['text'].storage = atapi.AnnotationStorage()