- Issue created by @Gรกbor Hojtsy
- ๐ท๐ธSerbia finnsky
@anjali rathod Thank you for joining Navigation!
You don't need to assign tasks to yourself. Usually it's enough to write that you're working on it.
https://www.drupal.org/docs/develop/issues/fields-and-other-parts-of-an-... โ
- ๐ฎ๐ณIndia anjali rathod India
Should we have separate icon set for different entity types? This would mean to have another field added to each entity type and user if has set the logo for the entity then it would appear otherwise fallback to database icon. Or should we have another field for icon in the module configuration form that would replace the default icon and would be same across all the entities.
- ๐ฎ๐ณIndia anjali rathod India
I am thinking of doing something like this. Any suggestions or if there is any better way to implement it?
- ๐ญ๐บHungary Gรกbor Hojtsy Hungary
I think the current problem is the code does not allow for different icons at all, it is hardcoded to one icon for all entities. I don't think this should be quite given to the user as an option, but the developers of the entity should be able to specify an icon, practically I think in the entity PHP annotation / attributes. Then the icons could be swapped with a different icon set assuming a contrib for that on the site or possibly the entity definition altered for even more icon customization. But the core module I don't think would need a UI to upload/change these icons only.
- ๐ช๐ธSpain plopesc Valladolid
Agree that adding a new UI to handle this could be complex and not easy to maintain, since new modules can add new content entity types.
Besides Gร bor's approach, another possibility could be to use create a theme wrapper for the PageContext render array. That theme wrapper would expose a preprocess hook, from where XB or other modules could alter the PageContext content. That would allow to customize quickly not only the icon, but also the badge text or status.