Somewhere between Plone 5.0 and 5.2 the AjaxSelectWidget lost the ability to browse folders (as precarious as it used to be, it kind of worked). Now my clients are clamoring to get that ability back. Is there any way to reenable it?
Clicking on the weird "content tree" icon at the left you got all the folders at your current level and you could drill down to the desired folder any level deep:
and the only thing you can do seems to be to type a substring of the title of the item you are looking for, but you can't "find" it by drilling down folder by folder.
Just to be clear, the widget is what I get if I define a field like this:
my_field = RelationList(
Side note: is there any way for an editor to add something to the "Favorites" menu?
add a breaking test and get it merged?
Strange to see that you cannot navigate the folders. I evantually cobbled something together with the result below. Clicking on the arrows allows for navigating to subfolders.
Yes, you can modify favorites. So far, I have only created favorites in code. Will look for relevant code and post back here.
There are two parameters for types nowadays: you are here limiting the items that are coming back in the ajax view through the widget. Where what you want to achieve is that all 'folderish' plus non folderish types you want selectable are returned to the widget. And the widget itself has to know which items it should make 'selectable'.
Example from @pbauer's excellent update to the Mastering Plone training with many examples for Dexterity fields and widget configurations at https://training.plone.org/5/mastering-plone/dexterity_reference.html :
relationchoice_field = RelationChoice(
In this example the full content tree is returned to the widget, you could optimise this by filtering for 'Folder','MyOtherType' in the CatalogSource, and having 'MyOtherType' in the "selectableType" of the pattern_options.