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
2 Answers
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:
SPClientTemplates.TemplateManager.RegisterTemplateOverrides({
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.
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:
Open the site with the document library where you want to show the files extensions in SharePoint Designer 2013.
Open the All Documents View in the advanced mode. (Picture is in German)
Search for the
<ViewFields>
tag and add<FieldRef Name="File_x0020_Type"/>
to<ViewFields>
tag.Save everything.
The outcome should look like this:
Maybe this is an option for you.
-
Or maybe here you can find something (but I didn't get it to work in SP2013): sharepoint.stackexchange.com/questions/45827/…– PatrickCommented Apr 29, 2016 at 7:07