sunew
sunew

Reputation: 516

plone dexterity inject behavior field after description field

I'm trying to inject a field from a behavior directly after description, before the content types own fields (non-behavior-based fields).

form.order_after(myfield = 'IBasic.description')

does not work - the field still shows up after the non-behavior fields.

form.order_before(myfield = '*') 

works, but of course puts the field completely at the top.

form.order_before(myfield = '*')
form.order_after(myfield = 'IBasic.description')

the field is still at the top.

What did I miss?

form.order_before(myfield = 'first_field_from_ctype')

works, but in the nature of things the content types have different fields.

plone.app.dexterity-1.2.1

plone.dexterity-1.1.2

plone 4.2b2

Upvotes: 3

Views: 249

Answers (1)

ebrehault
ebrehault

Reputation: 2601

The description field is in the IDublinCore behavior, so the proper code is:

form.order_after(myfield = 'IDublinCore.description')

Upvotes: 2

Related Questions