def onefaq(self): """ onefaq method """ dummy = _(u'a dummy string') return {'dummy': dummy}
# -*- Message Factory Imported Here -*- from collective.linguafaq import linguafaqMessageFactory as _ from collective.linguafaq.interfaces import IFaqItem from collective.linguafaq.config import PROJECTNAME FaqItemSchema = document.ATDocumentSchema.copy() + atapi.Schema(( # -*- Your Archetypes field definitions here ... -*- atapi.BooleanField('excludeFromNav', required = False, languageIndependent = True, schemata = 'default', # moved to 'default' for folders widget = atapi.BooleanWidget( description=_(u'help_exclude_from_nav', default=u'If selected, this item will not appear in the navigation tree'), label = _(u'label_exclude_from_nav', default=u'Exclude from navigation'), visible={'view' : 'hidden', 'edit' : 'visible'}, ), default=True, ), )) # Set storage on fields copied from ATContentTypeSchema, making sure # they work well with the python bridge properties. FaqItemSchema['title'].storage = atapi.AnnotationStorage() FaqItemSchema['title'].widget.label = _(u"faqquestion") FaqItemSchema['title'].widget.description = _(u"faqquestiondesc")
from collective.linguafaq import linguafaqMessageFactory as _ from collective.linguafaq.interfaces import IFaqGroup from collective.linguafaq.config import PROJECTNAME FaqGroupSchema = folder.ATFolderSchema.copy() + atapi.Schema( ( # -*- Your Archetypes field definitions here ... -*- atapi.BooleanField( "excludeFromNav", required=False, languageIndependent=True, schemata="default", # moved to 'default' for folders widget=atapi.BooleanWidget( description=_( u"help_exclude_from_nav", default=u"If selected, this item will not appear in the navigation tree" ), label=_(u"label_exclude_from_nav", default=u"Exclude from navigation"), visible={"view": "hidden", "edit": "visible"}, ), default=True, ), ) ) # Set storage on fields copied from ATContentTypeSchema, making sure # they work well with the python bridge properties. FaqGroupSchema["title"].storage = atapi.AnnotationStorage() FaqGroupSchema["description"].storage = atapi.AnnotationStorage()