Forum Discussion
Customize (color code) folder/doc set icon in grid view of library
One of our departments has a document library with a document set for each course in their program. They'd like to color-code them by the type of course (seminar, studio or elective) in the tile view of the library. If it could also apply to the list view, that would be great, but not required.
I'm hoping this is possible using the "field customizer", but I'm not sure which field to specify in the JSON. Also, I hope that default icon in transparent, so simply specifying a background color on that div would do the trick. I'm still trying to wrap my head around the logic defining the "conditional" part of it, too, so if anyone has a good resource for understanding that, I'd appreciate the help.
- Chris GullicksenIron ContributorI've never seen a document library look quite like that before. What version of SharePoint are you using and do you happen to have any metadata associated with the folders?
- I don't think you are going to get this working with a Field Customizer...I would say your choice here is to create a SPFx WebPart that you could add to either a classic or a modern SPO page
- Chad_V_KealeySteel Contributor
That's what I was afraid of. Wishful thinking, I guess. Considering this site is going live to an accreditation review committee in a few weeks, a custom web part is out of scope at this point.
- Chad_V_KealeySteel Contributor
We're using O365 and SharePoint Online. This is the default "tiled" view of the document library, but it's got document sets instead of folders (hence the different icons). There are several metadata columns in the library, but not the "Course Type" field (which would be used for controlling the icon color).
- Chris GullicksenIron Contributor
As I think about this I thought I would offer an alternative idea for you. If you could color code the folders you would still need some sort of key to help users know what each color means. With that said would be easier to just create a "choice" column and use that to group the folders by different metadata instead? The Extended Folder content type can be used to accomplish this. Perhaps even use a classic view to group all the folders by the metadata defined. The end result would be grouped folders that are related in some meaningful way.