Monday, November 21, 2011

Add icons to document types

When you add a document of unknown type for SharePoint, a neutral document icon appears in the document librairie near the file. Here is the example for a PDF File:

To display a PDF icon as on Windows, the first step is to download the wished picture fromGoogle image for example with a size of 16 x 16 pixels. Store this picture in the folderC:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\IMAGES on the server.

To reference the picture with the PDF extension, open the file DOCICON.XML located in the folder C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\XML. Into the section ByExtension, add a line like below:
pdf16.gif should be replaced by the name of your picture previously downloaded.

Restart IIS with the command iisreset.

When reloading the document librairie, the new icon appears:


No comments:

Post a Comment