plone / plone.formwidget.querystring

z3c.form-based widget for composing a Query string/search
https://pypi.org/project/plone.formwidget.querystring/
3 stars 4 forks source link

How should we handle types that are global_allow=False in queries in collections? (Plone 4.3.x) #16

Open idgserpro opened 7 years ago

idgserpro commented 7 years ago

I'm posting this issue here and in plone.app.querystring, feel free to close if inappropriate.

We're using https://github.com/collective/collective.nitf instead of Plone's "News Item" content type, and decided to set "Implicitly addable" (global_allow) to False in "News Item" portal_types. For the sake of usability/familiarity of the user with Plone naming, we decided to rename in a policy product the nitf items to "News Item" as if it was Plone's. So far, so good.

But now we're having some usability problems when adding a collection, since both "News Item" are being shown in the select field (In Brazilian portuguese, "Noticia" is the same as "News"):

selecao_008

I know that from a programatic POV this is correct (they are both valid in portal_types), but not from an user perspective: if I can't add the "News Item" anywhere in the site since I set "Implicity addable" to false, why it's being shown here?

I'm not familiar with the code, but what defines what types should be shown in the select? Is it possible to add somewhere to not use items which global_allow is False, or to take into consideration types_not_searched in portal_properties? I tried to add "News Item" to types_not_searched but it didn't work.