Someone wants to inject their own icons to Sitecore 8 so that they will be able to change the icon of Sitecore items later inside Sitecore (please click here to get how to configure item icons). It’s something like this:
Modifying \sitecore\shell\Applications\Content Manager\Dialogs\Set Icon\Set Icon.xml which handles Change Icon dialog of Sitecore:
- replace CodeBeside to the new class so that we can have a chance to add the custom icons and some missing icons of Sitecore such as ApplicationsV2, BusinessV2, FlagsV2, NetworkV2, PeopleV2, SoftwareV2 to Change Icon dialog
- add new multiple ListItem to “Selector” Combobox
- add new multiple Scrollbox to “List” Border
In the new class SetIconForm which is cloned from Sitecore.Shell.Applications.ContentManager.Dialogs.SetIcon.SetIconForm
- add new multiple properties:
- update RenderIcons method by adding these lines below:
Creating a zip file as Custom.zip whose the folder structure should be same as the default ones (Ex: \sitecore\shell\Themes\Standard\Apps.zip) and putting it into \sitecore\shell\Themes\Standard folder
PLEASE DO NOT FORGET to deploy the new SetIconForm class to the Sitecore instance.
ARE YOU LAZY?
Yes, I am. That’s why I create a Sitecore package so that I can install it and play with the custom icons + the missing ones as well on any Sitecore instances:
- should backup sitecore\shell\Applications\Content Manager\Dialogs\Set Icon\Set Icon.xml
- download it on Sitecore Marketplace or on Gitlab and install it to your Sitecore instance via Installation Wizard
- click Yes button when you see something like this
- try to change the icon of a Sitecore item and hopefully you’re gonna see these ones
- in case you don’t see new custom icons on Change Icon dialog after adding them to Custom.zip file, please try to delete these files below in \Website\temp folder then open up that dialog again:
- integration example:
Not Good Enough? Please feel free to download the source code and add your own enhancements if necessary.
Please send your issues (with screenshots if possible) to firstname.lastname@example.org so that I have a chance to understand your problem and be able to suggest the solution.
Happy Sitecore Coding!