Swapping fields around in an ATContentTypes subclass
This How-to applies to: 1.4.0
This cannot be done by ArchGenXML directly (yet). You can re-order your fields to your heart's content, though, using python code. Put the code just after the schema declaration in your .py file. Take this snippet, for example:
....
##code-section after-local-schema #fill in your manual code here
##/code-section after-local-schema
Newsitem_schema = getattr(ATNewsItem,'schema',Schema(())).copy() + \
schema.copy()
##code-section after-schema #fill in your manual code here
Newsitem_schema.moveField('subTitle', after='title')
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ This is the line you want
finalizeATCTSchema(Newsitem_schema)
##/code-section after-schema
class Newsitem(ATNewsItem):
....
So the code to use is:
Your_schema.moveField('subTitle', after='title')
You can also use "before" and so.