【问题标题】:plone dexterity inject behavior field after description field描述字段后的克隆敏捷注入行为字段
【发布时间】:2023-03-23 22:58:01
【问题描述】:

我试图在描述之后,在内容类型拥有字段(非基于行为的字段)之前直接从行为中注入一个字段。

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

不起作用 - 该字段仍显示在非行为字段之后。

form.order_before(myfield = '*') 

有效,但当然会将这个领域完全放在首位。

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

该字段仍在顶部。

我错过了什么?

form.order_before(myfield = 'first_field_from_ctype')

有效,但本质上内容类型具有不同的字段。

plone.app.dexterity-1.2.1

plone.dexterity-1.1.2

克隆 4.2b2

【问题讨论】:

  • 你能提供更完整的代码示例吗?我尝试了使用“form.order_after(myfield = 'IBasic.description')”的行为,报告的版本没有任何问题:行为字段在 IBasic.description 和内容类型自己的字段之间设置正确。

标签: plone dexterity plone-4.x


【解决方案1】:

description 字段在 IDublinCore 行为中,因此正确的代码是:

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-10-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-09-28
    • 1970-01-01
    相关资源
    最近更新 更多