Closed (fixed)
Project:
UI Patterns (SDC in Drupal UI)
Version:
8.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
6 Feb 2023 at 16:29 UTC
Updated:
18 Mar 2023 at 15:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #3
grimreaperComment #4
duaelfrI've been able to use the
icon_mapkey within one pattern with UI Patterns Layout Builder.Would you want to be able to provide an icon as an image file?
Comment #5
pdureau commentedThanks @Duaelfr tested on my project, it works!
@Grimreaper I guess this "Icon map" solution is OK, isn't it?
Comment #6
duaelfrSeen during the monthly call:
icon_pathalso allow to set a path to an icon file.It only works on Layout Builder with UI Patterns Layout Builder.
@see ui_patterns_layout_builder_layout_alter()
Comment #7
grimreaperHi,
Tested with:
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.
Comment #8
duaelfr(I agree, let's open a followup :) )
Comment #9
pdureau commentedIs 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
Comment #10
grimreaperFollow up issue created: #3345978: Be able to provide relative icon path
@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.