A user selects an icon in the Umbraco Backoffice,
and now we need to display that icon on the client side.
How is this achieved?
I imported the uui-icon locally and through NPM but for instance, “favorite” did not work.
More concerning, uui-icon-registry-essential doesn’t provide all of the icons, which is where I turned to initially.
How does one display the icon client side?
(I used to do this with the IconService.)
Hi @markadrake
That is not a easy task, as the Icons are provided via the Extension Registry in the CMS. Making those tied to the Extension Registry of the Backoffice.
You could use uui-icon, which relies on a uui icon registry. But from UI Library you only get the Essentials Registry, which as you mentioned is not enough.
So then your option is to setup your own registry and configure that with the Icons, which again is defined in Backoffice via Icon-Set Extension Type. So again long way to load those icons in. If you really want to go that way, then look closer at UmbIconRegistry in the Core.
I think you may just want to get the SVGs, then you could copy them out of the Source Code.
Otherwise if you like them to originate from Backoffice, I think you could load them from the Umbraco Backoffice file system, but that may be fragile. Try to do a network inspection then you can see the path of their existence.
Good luck 