- 🇫🇷France Grimreaper France 🇫🇷
Hi,
Changing of project as this is not UI Suite Bootstrap related.
Currently, you can define a block content type with an image field or a media field and then use it. But that's not necessarily the best way. Or use the "data from a field".
It depends on your site structure. And not sure that it is the best experience for editors to access component directly. I think it is better to prepare block types (that will use the components with fields) and so the editors only can place blocks.
- 🇫🇷France just_like_good_vibes PARIS
hello,
thank you for this interesting question :)
so there is something very important that needs to be understood when configuring components with ui patterns.there are different places in a drupal site, where one is configuring a component through the user interface, thanks to ui patterns and its
component form.
in a block (instance placed in block layout), in views, in field ui (in manage display of an entity type of entity bundle, or field layout, layout builder)… etc
in all those cases, the configuration of the component done in the UI will be stored as drupal config.
And we absolutely don’t want to make references to content entities in drupal config.
the only good case to make that, is. when the configuration of the component is stored in a content, like in the very specific case of layout builder override for example.
sources that take external contents (files, content entities, whatever), usable in the “content”
context, do not exist yet.
for files and an upload form widget, we could think about storing them in the config (like base64 images?), but not sure we will go for that now.such sources with reference to contents will be introduced soon (more info coming soon), especially in the case of the upcoming display builder projet. they are part of the global puzzle.
However, in a custom project, it is totally ok to create and use such sources anywhere as soon as developers are realizing what they are doing (like hardcoding in config, some references to content entities)