0

I have a document library with multiple cusotom content types derived from "Document Set". They all show up with the same icon in a general list view.

Here's what I would like to do: I'd like to change the icon in my list view to be different depending on the content type of each item. For example my content type "Car" would get a car-icon, my "Bike", would get a bike-icon.

I know that Sharepoint does not allow me to do this out of the box. How would I do that using java script? (maybe I can even use something like these https://fortawesome.github.io/Font-Awesome/ ?)

Any pointer in the right direction would be appreciated...

2
  • Lame proposal: A read only field on each content type that store the url of the icon, then work up from there? I know it is only a guess, I will try to elaborate more as soon as I get some time. – SPArcheon Aug 25 '14 at 15:19
  • 2
    Use JSLink and override the field rending of the particular view. see example: zimmergren.net/technical/… – Aveenav Aug 26 '14 at 17:33
1

JSlink is indeed a great way to do this.

Here is a good tuturial that got me started: http://www.learningsharepoint.com/2013/04/01/add-task-status-indicators-in-sharepoint-2013-using-js-link/

1
  • 1
    This is actually a nice article because it covers a general but basic case of doing some csr with jslink – John-M Sep 5 '14 at 12:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.