Héctor Velarde wrote:
Héctor Velarde wrote:
class NITFExtender(object):
    adapts(IATNewsItem)
    implements(ISchemaModifier)

ok, sorry, I found that this one is the only possible solution... but now I'm starting over again: do I have to do this?

     def fiddle(self, schema):
         schema = schema + MetadataSchema((...))

         schema['relatedItems'].schemata = 'metadata'
         schema.moveField('relatedItems', before='contributors')
         schema['subject'].schemata = 'default'
         schema.moveField('subject', after='imageCaption')

what about the new fields? what about default and vocabulary methods?

The usage.txt doctest in the svn version shows how to create defaults and vocabularies - you do them on the field subclass.

after this I think we can document all possible variants.

I suggest that you use the standard ISchemaExtender semantics to add new fields, and then use the ISchemaModifier to re-order a few fields at the end.

Martin

--
Author of `Professional Plone Development`, a book for developers who
want to work with Plone. See http://martinaspeli.net/plone-book


_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers

Reply via email to