after getting some help from Martin I was able to solve some of the problems I found in my implementation. now I have methods for getting default values and vocabularies and they work like a charm.

but when I tried to change the order of the fields I found IOrderableSchemaExtender only knows about fields defined inside my extender. it wouldn't work for me because I want to move 'relatedItems' and 'subject' around schematas.

Erik Rose showed me the ISchemaModifier adapter that, if I understood correctly, let me do everything by modifying the schema directly.

my question now is, what's the best and/or safer approach to accomplish what I want:

class NITFExtender(object):
    adapts(IATNewsItem)
    implements(ISchemaExtender)
    implements(ISchemaModifier)

or

class NITFExtender(object):
    adapts(IATNewsItem)
    implements(ISchemaModifier)

in the first case, I can use ISchemaExtender to add the new fields and ISchemaModifier to change schemata and order.

in the second case, I can use ISchemaModifier to add the new fields and change schemata and order.

saludos


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

Reply via email to