How I order behavior IDublinCore in Dexterity Type?

前端 未结 2 691
难免孤独
难免孤独 2021-01-19 02:34

I\'m writing a product using Python Dexterity Type, and I have Title and Description, this fields come from a behavior plone.app.dexterity.be

相关标签:
2条回答
  • 2021-01-19 03:21

    Since you got your own Dexterity Type you can handle with form directives aka setting taggedValues on the interface.

    from plone.autoform import directives
    
    
    class IYourSchema(model.Schema):
    
        directives.order_before(collage='IDublinCore.title')
        collage = schema.TextLine(
            title=u'Collage',
        )
    

    You find excellent documentation about this feature in the plone documentation http://docs.plone.org/external/plone.app.dexterity/docs/reference/form-schema-hints.html#appearance-related-directives

    0 讨论(0)
  • 2021-01-19 03:23

    How about using Jquery? (Since the fieldsets are using Jquery anyway)

    For example to move Tags under Summary....

    $('body.template-edit.portaltype-document #formfield-form-widgets-IDublinCore-subjects').insertAfter('#formfield-form-widgets-IDublinCore-description')
    

    Note: This is a copy of my answer here

    0 讨论(0)
提交回复
热议问题