lets say i have a contenttype "employee", which should act like a plone default contenttype, but with additional and slightly different fields.
it has a schema:
- title (readonly - will be a composition of first_name, last_name and degree using a IEmployeeTitle behavior)
first_name
last_name
degree - biography
- description
- portrait
- copyright_info
address
phone
mail
behaviors included:
plone.app.content.interfaces.INameFromTitle
plone.app.dexterity.behaviors.exclfromnav.IExcludeFromNavigation
plone.app.dexterity.behaviors.id.IShortName
plone.app.dexterity.behaviors.metadata.IDublinCore
plone.app.contenttypes.behaviors.leadimage.ILeadImage
plone.app.relationfield.behavior.IRelatedItems
plone.app.versioningbehavior.behaviors.IVersionable
plone.app.lockingbehavior.behaviors.ILocking
title and description are done by plone.app.dexterity.behaviors.metadata.IBasic, BUT how to make the title readonly without sub-classing and/or reimplementing the fields?
the positioning of the description after biography is also not easy to achieve.
plone.autoform.directives does allow to sort a field before or after a field name. BUT not fields not definded in the current schema. i can sort of understand that, but its hard to work ... i would have to sort n fields before a field in another behavior instead of telling that to be placed somewhere else.
portrait and copyright_info are plone.app.contenttypes.behaviors.leadimage.ILeadImage, BUT how to rename the field titles from "lead image" and "lead image text" to "portrait" and "copyright information"?
biography would be done by plone.app.contenttypes.behaviors.richtext.IRichText, BUT how to - again - rename the field-title from "text" to "biography"
so two questions:
- why can't i do something like directive.order_before(IBasic.description='biography')
- why can't i change label texts and settings like title = IBasic.title; title.readonly = True or text = IRichText.text; text.title=u'Biography'