如何订购敏捷类型中的行为IDublinCore? [英] How I order behavior IDublinCore in Dexterity Type?

查看:57
本文介绍了如何订购敏捷类型中的行为IDublinCore?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Python Dexterity Type编写产品,并且我有TitleDescription,此字段来自行为plone.app.dexterity.behaviors.metadata.IDublinCore,但是我需要将此字段与我的字段重新排序.

I'm writing a product using Python Dexterity Type, and I have Title and Description, this fields come from a behavior plone.app.dexterity.behaviors.metadata.IDublinCore, but I neeed reorder this fields with my fields.

示例:

我的领域:文档,拼贴,年龄,传记

My fields: document, collage, age, biography

IDublinCore:标题,说明

IDublinCore: Title, Description

顺序:拼贴,标题,文档,年龄,传记,说明

The order: collage, Title, document, age, biography, Description

我该怎么做?

推荐答案

由于您拥有自己的敏捷类型,因此可以在界面上使用form directives aka setting taggedValues进行处理.

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',
    )

您可以在plone文档

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

这篇关于如何订购敏捷类型中的行为IDublinCore?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆