Wednesday, July 27, 2005

How to show file extensions in a SharePoint document library

Nice tip from Fabian Moritz - how to show file extensions in a SharePoint document library (Unfortunately... it took me a while to understand "Dateierweiterungen" although Dutch and German are pretty similar) - here's a quick translation. There are actually 2 ways to show file extensions in a SharePoint document library:
  • Convert the document library listviewwebpart to a XSLT dataview - Open the documentlibrary with FrontPage, rightclick and convert to dataview. Modify the XSLT to add <xsl:value-of select="@File_x0020_Type"/>

  • Modify the display pattern in ONET.XML - add <HTML><![CDATA[.]]></HTML><Field HTMLEncode="FALSE" Name="File_x0020_Type"/> before <HTML><![CDATA[</A>]]></HTML><IfNew Name="Created_x0020_Date"> . After making a change to ONET.XML you have to do IISRESET.



  • [Listening to: Til the Clouds Clear - Lamb - The Best Kept Secrets: The Best of Lamb 1996-2004 [Bonus DVD] Disc 1 (04:27)]



    3 comments:

    Anonymous said...

    Do you have a solution for SharePoint 2007 to show file extensions in document libraries?

    Anonymous said...

    same solution for 2007. The onet.xml file located at C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\GLOBAL\XML\ONET.XML
    needs to be updated.

    Anonymous said...

    ONET.xml modification for sharepoint 2010 does not seem to work.. Is there another way to apply it for the farm?