Display link with icon (SharePoint)

When working within a SharePoint publishing site, the Edit Content window allows for some really cool WYSIWYG editing.

As well as formatting of styles, fonts, etc, there’s is a quick-click to include a link to a web-page (hyperlink) – or to a document, such as a Word DOCX, or PDF. 

You often see this shown on pages with link to a map, or restaurant menu, etc.

image

You can tick a box to “Display link with icon”, to notify the user which type of file will be opened when clicking the link.

image

This works fine for files such as Microsoft Word, Excel, etc (Office Suite). but other file types will show the default icon (ICGEN.GIF) – which looks pretty crappy.   (eg. when the file type is PDF)

image

But – you can include a custom icon within the SharePoint “hive” and update a config file to show the correct icon.  

You could even include some other icon type, basically for ANY file type (extension).

Here’s the steps to update the icon to use :

  • Firstly, copy or create an icon file to use (16×16)
  • Here’s a good image I found for use with “PDF” file types :  pdf16x16
  • Copy this file to the following location :

C:Program FilesCommon FilesMicrosoft SharedWeb Server Extensions12TEMPLATEIMAGES

  • Next up, switch across to the XML folder :

C:Program FilesCommon FilesMicrosoft SharedWeb Server Extensions12TEMPLATEXML

  • Open the following XML file :

DOCICON.XML

  • Scroll down and include a new setting for “Mapping” :

image 

<Mapping Key=”pdf” Value=”pdf16x16.gif”/>

  • Save the file – and then do an IISRESET.

NOTE : Unfortunately – you can’t simply “refresh” the page, it won’t pick up the new image.  

You will have to re-add the link – as this image is added when you click OK to the “Add Hyperlink” dialog (ie. when doing content editing).

In the following screen shot, the initial “click here” retains the original icon – but the new link has the new image inserted.  

image

Any NEW content pages will have the correct icon – just might need to re-check/re-link to the specific file/s needed.

Thanks to Zabi Chennai for this tip.

Advertisements

2 thoughts on “Display link with icon (SharePoint)

  1. Pingback: Incluir ícone para extensões diferentes na biblioteca do SharePoint | Pensando SharePoint

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s