Missing link between IField and widgets for Dexterity

Inside XML Director I have a special Dexterity field XML (derived from zope.schema.Text) that is used to store XML content:

https://github.com/xml-director/xmldirector.plonecore/blob/master/xmldirector/plonecore/dx/xml_field.py#L50-L66

However this XML field now requires a special rendering for display/input mode aka it needs a custom widget.

In example code (e.g. collective.datagridfield) I found these definitions using z3c.widgetTemplate

<z3c:widgetTemplate
mode="input"
widget=".blockdatagridfield.BlockDataGridField"
layer="plone.app.z3cform.interfaces.IPloneFormLayer"
template="datagridfield_input_block.pt"
/>

It is not clear how to link a particular field implementing IField with a custom widget class.
What is the canonical approach here? Any reasonable example code?

-aj

Stupid me...I solved the problem for a different field in XML Director already a year ago inside the same configure.zcml :stuck_out_tongue:

-aj