Add constants for default icons #11137
Replies: 3 comments
-
While not a complete list, there is already this: https://github.com/umbraco/Umbraco-CMS/blob/v8/contrib/src/Umbraco.Core/Constants-Icons.cs |
Beta Was this translation helpful? Give feedback.
-
First reaction: I don't think we should, it will never be a complete list since people can install custom icons. If there's a nice way to build a list of available icons (think: modelsbuilder) then.. maybe. |
Beta Was this translation helpful? Give feedback.
-
Maybe a starting point? Umbraco-CMS/src/Umbraco.Web/Services/IconService.cs Lines 29 to 32 in 405ed44 This gets all known icons (including third-party/user-added), where the key is the icon filename (less the extension). How that would be converted into anything useful, I don't know, but we do have an object containing a reference to every icon. Maybe a source generator? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Following this tweet https://twitter.com/jjowensdev/status/1439863102439411712, could we add those to core? Would make it a lot easier to reference icons in code (when setting up sections, trees etc.)
Beta Was this translation helpful? Give feedback.
All reactions