Rendering custom fields/widgets in custom DX views?

I have a DX content-types with collective.geolocationbehavior.

Inside a custom view I want to render the geolocation widget (which is based on plone.formwidget.geolocation).

What is the canonical way to render field with its widget in a custom view? In Archetypes you just had to iterate over all fields and call their widget() there something I am missing in Dexterity?


You need to derive from DefaultView instead of BrowserView and put this inside your template:

<div tal:content="structure python: view.w['IGeolocatable.geolocation'].render()">

I do this in my template:

<tal:block tal:define="
    widgets nocall:view/widgets;
    title_widget widgets/IBasic.title|nothing">
    <tal:field tal:condition="title_widget" tal:replace="structure widgets/IBasic.title/@@ploneform-render-widget" />  


What is the difference between the render() method and calling @@ploneform-render-widget?

I think, render() is only for the Output-Value without the whole Field Stuff, like Help Message, error-Message and so on. But i don't really know.