How do I add a content type to a document library so that *.tar.gz actually shows up in the name of the file. It shows up when I view permissions, but not in the library view


An other option is to use CSR (here is some basic info for setting the JSLink property on a webpart: http://www.learningsharepoint.com/2013/09/16/set-js-link-webpart-property-in-sharepoint-2013/). CSR is the new way for customizing how your fields are rendered. Following code will output the filename including the extentions:

      Templates: {
           Fields: {
               "LinkFilename": {
                   View: function(ctx) {return ctx.CurrentItem.FileLeafRef; },

      ListTemplateType: 101


Place this code in a js file, store the file in the siteassets library and configure your webpart to use this file.

  • That is way better! Awesome solution! – Patrick Apr 29 '16 at 7:44
  • That looks like it would work. I will try that – B watt Apr 29 '16 at 18:20

Well, I don't know how to get the file type directly into the name column, but you can show the column file type.

Approach: The normal view:

enter image description here

  1. Open the site with the document library where you want to show the files extensions in SharePoint Designer 2013.

  2. Open the All Documents View in the advanced mode. (Picture is in German)

enter image description here

  1. Search for the <ViewFields> tag and add <FieldRef Name="File_x0020_Type"/> to <ViewFields> tag.

  2. Save everything.

enter image description here

The outcome should look like this:

enter image description here

Maybe this is an option for you.

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.