- Issue created by @Grimreaper
- 🇫🇷France duaelfr Montpellier, France
I've been able to use the
icon_map
key within one pattern with UI Patterns Layout Builder.layout_test: label: Layout test settings: distribution: type: select label: Distribution options: 25-75: '25 / 75 %' 33-66: '33 / 66 %' 50-50: '50 / 50 %' icon_map: - [title] - [content_main, content_secondary] fields: title: type: string label: Title preview: 'Preview title' content_main: type: string label: Main content preview: 'Main content' content_secondary: type: string label: Secondary content preview: 'Secondary content' libraries: - layout_test: css: component: layout_test.css: {}
Would you want to be able to provide an icon as an image file?
- Assigned to Grimreaper
- Status changed to Needs review
almost 2 years ago 8:24pm 13 February 2023 - 🇫🇷France pdureau Paris
Thanks @Duaelfr tested on my project, it works!
@Grimreaper I guess this "Icon map" solution is OK, isn't it?
- 🇫🇷France duaelfr Montpellier, France
Seen during the monthly call:
icon_path
also allow to set a path to an icon file.
It only works on Layout Builder with UI Patterns Layout Builder. - Issue was unassigned.
- Status changed to Fixed
over 1 year ago 1:43pm 28 February 2023 - 🇫🇷France Grimreaper France 🇫🇷
Hi,
Tested with:
icon_map: - [ title, toto, tutu ] - [ title, content_main, content_secondary ] - [ a, b, c, d, e ]
icon_path: "themes/custom/ui_suite_bootstrap/screenshot.png"
Ok for me, a little bit sad that with icon_path it is not related to the pattern path or the module or theme path containing the pattern.
- 🇫🇷France pdureau Paris
Is it possible to extend Drupal\ui_patterns\Form\PatternDisplayFormTrait to display those icons on others places?
For example, like what is done by: https://www.drupal.org/project/select_icons →
- 🇫🇷France Grimreaper France 🇫🇷
Follow up issue created: ✨ Be able to provide relative icon path Active
@pdureau: I think it would also be nice, but maybe the icon size will not be adequated. I let you create a dedicated issue for this subject.
Automatically closed - issue fixed for 2 weeks with no activity.