This Saturday and Sunday a couple of Plonistas will sprint to improve dealing with relations in Plone 6
When?
30.01. and 31.01.2021 from 4pm-8pm UTC (5pm-9pm CET)
Where?
We'll meet at https://meet.zestsoftware.nl/plone
What about?
-
Fix DataManagers and Converters if Relation-Fields to allow using different widgets without requiring the full objects in custom vocabularies as described in 43. Relations — Plone Training 2021 documentation
-
Document best-practices and various options when working with relations in docs.plone.org and training.plone.org.
-
Start including code from collective.relationhelpers in plone.api and CMFPlone
A question about Volto: Can I get Volto to respect a catalog-query that constrains the items that are allowed to be selected in a relationfield? This example does not work (it raises a ValidationErrorin plone.restapi.deserializer.dxcontent
):
relation = RelationList(
title='Only Documents and News',
default=[],
value_type=RelationChoice(
source=CatalogSource(
portal_type=['Document', 'News Item'],
review_state='published',
)
),
required=False,
)
By the way: I only now figured out that the RelatedItemsFieldWidget has a search-mode that is great to set specifically when used with a CatalogSource query