On 12/04/12 15:37, Mohd Izhar Firdaus Ismail wrote:
Cool, :D
On Thu, Apr 12, 2012 at 5:44 AM, Gonzalo Almeida<[email protected]> wrote:
I thought may be overriding the ICategorization behavior.. but I
couldn't find a way to override a behavior
anyone know how can I achieve this in dexterity?
This is how i overridden ICategorization subject field with
collective.z3cform.keywordwidget.widget.KeywordFieldWidget
from plone.autoform.interfaces import WIDGETS_KEY
from plone.directives.form.schema import TEMP_KEY
from plone.app.dexterity.behaviors.metadata import ICategorization
from zope import schema as _schema
_directives_values = ICategorization.queryTaggedValue(TEMP_KEY)
_directives_values.setdefault(WIDGETS_KEY, {})
_directives_values[WIDGETS_KEY]['subjects'] =
'collective.z3cform.keywordwidget.widget.KeywordFieldWidget'
_schema.getFields(ICategorization)['subjects'].index_name = 'Subject'
Ideally this should the fix for the default dexterity behavior which is
broken. It should work for dexterity as it does for standard Plone AT types.
_______________________________________________
Product-Developers mailing list
[email protected]
https://lists.plone.org/mailman/listinfo/plone-product-developers