I converted a
zope.schema.Text to a
plone.app.textfield.RichText field in a dexterity content type, which used to not have a python class, but just a simple template.
Is there a specific syntax to show the field value (i.e.
context/field_name/output) in Chameleon that does not break if the field is empty?
My current approach is adding a dummy class on the browser view that just handles the case of the field being empty, but it feels so much as a common use case that there should be a way to handle it.
I just checked
plone.app.contenttypes and for the Document template is doing:
So checking the truthiness of the field and if so, showing its contents.
Are there other approaches?